Skip to content

Commit

Permalink
Use PyJWT 2.1.0 or later (as used by Home Assistant)
Browse files Browse the repository at this point in the history
  • Loading branch information
jschlyter committed Oct 7, 2021
1 parent 809f1a0 commit e8eaa50
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## 1.4.4 (2021-10-07)

- Use PyJWT 2.1.0 or later (as used by Home Assistant)

## 1.4.3 (2021-07-02)

- Update default API base URL
Expand Down
2 changes: 1 addition & 1 deletion chargeamps/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def _ensure_token(self):
json={"email": self._email, "password": self._password},
)
self._token = (await response.json())["token"]
token_payload = jwt.decode(self._token, verify=False)
token_payload = jwt.decode(self._token, options={"verify_signature": False})
self._token_expire = token_payload.get("exp", 0)
self._headers["Authorization"] = f"Bearer {self._token}"

Expand Down
17 changes: 9 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ profile = "black"

[tool.poetry]
name = "chargeamps"
version = "1.4.3"
version = "1.4.4"
readme = "README.md"
description = "Charge-Amps API bindings for Python"
authors = ["Jakob Schlyter <[email protected]>"]
Expand All @@ -32,7 +32,7 @@ asyncio = "^3.4.3"
dataclasses-json = "^0.5.2"
isodate = "^0.6.0"
marshmallow = "^3.9.0"
PyJWT = "^1.7.1"
PyJWT = "^2.1.0"

[tool.poetry.dev-dependencies]
black = "^20.8b1"
Expand Down

0 comments on commit e8eaa50

Please sign in to comment.