Skip to content

Commit ad9d57c

Browse files
committed
chore: release 1.4.1
1 parent f831f5e commit ad9d57c

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

docs/changelog.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ Changelog
1212
.. module:: joserfc
1313
:noindex:
1414

15+
1.4.1
16+
-----
17+
18+
**Released on November 5, 2025**
19+
20+
- Add a base ``ClaimError`` for catching JWT claim validation errors.
21+
- Show security warnings when importing weak OctKey and RSAKey.
22+
1523
1.4.0
1624
-----
1725

docs/guide/jwt.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,23 @@ JSON object.
8686

8787
.. code-block:: python
8888
89+
from joserfc.errors import ClaimError, ExpiredTokenError, InvalidTokenError
8990
from joserfc.jwt import JWTClaimsRegistry
9091
9192
claims_requests = JWTClaimsRegistry(
9293
iss={"essential": True, "value": "https://authlib.org"},
9394
)
9495
9596
# usually you will use the claims registry after ``.decode``
96-
claims_requests.validate(token.claims)
97+
try:
98+
claims_requests.validate(token.claims)
99+
except ClaimError as error:
100+
print(error)
101+
except ExpiredTokenError as error:
102+
print("expired")
103+
except InvalidTokenError as error:
104+
# only happens when iat and nbf invalid
105+
print("invalid")
97106
98107
The Individual Claims Requests JSON object contains:
99108

src/joserfc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.4.0"
1+
__version__ = "1.4.1"
22
__homepage__ = "https://jose.authlib.org/en/"
33
__author__ = "Hsiaoming Yang <[email protected]>"
44
__license__ = "BSD-3-Clause"

0 commit comments

Comments
 (0)