File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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+
15231.4.0
1624-----
1725
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 1- __version__ = "1.4.0 "
1+ __version__ = "1.4.1 "
22__homepage__ = "https://jose.authlib.org/en/"
33__author__ = "Hsiaoming Yang <me@lepture.com>"
44__license__ = "BSD-3-Clause"
You can’t perform that action at this time.
0 commit comments