Skip to content

Commit e8eaa50

Browse files
committed
Use PyJWT 2.1.0 or later (as used by Home Assistant)
1 parent 809f1a0 commit e8eaa50

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

CHANGES.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes
22

3+
## 1.4.4 (2021-10-07)
4+
5+
- Use PyJWT 2.1.0 or later (as used by Home Assistant)
6+
37
## 1.4.3 (2021-07-02)
48

59
- Update default API base URL

chargeamps/external.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async def _ensure_token(self):
5151
json={"email": self._email, "password": self._password},
5252
)
5353
self._token = (await response.json())["token"]
54-
token_payload = jwt.decode(self._token, verify=False)
54+
token_payload = jwt.decode(self._token, options={"verify_signature": False})
5555
self._token_expire = token_payload.get("exp", 0)
5656
self._headers["Authorization"] = f"Bearer {self._token}"
5757

poetry.lock

+9-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ profile = "black"
55

66
[tool.poetry]
77
name = "chargeamps"
8-
version = "1.4.3"
8+
version = "1.4.4"
99
readme = "README.md"
1010
description = "Charge-Amps API bindings for Python"
1111
authors = ["Jakob Schlyter <[email protected]>"]
@@ -32,7 +32,7 @@ asyncio = "^3.4.3"
3232
dataclasses-json = "^0.5.2"
3333
isodate = "^0.6.0"
3434
marshmallow = "^3.9.0"
35-
PyJWT = "^1.7.1"
35+
PyJWT = "^2.1.0"
3636

3737
[tool.poetry.dev-dependencies]
3838
black = "^20.8b1"

0 commit comments

Comments
 (0)