File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1414
1515import jwt
1616import time
17- from typing import Dict , List
17+ from typing import Any , Dict , List , Tuple
1818
1919import planet_auth .logging .auth_logger
2020from planet_auth .auth_exception import AuthException , InvalidTokenException
@@ -258,13 +258,16 @@ def validate_token(
258258
259259 @staticmethod
260260 @InvalidArgumentException .recast (jwt .exceptions .DecodeError )
261- def hazmat_unverified_decode (token_str ):
261+ def hazmat_unverified_decode (token_str ) -> Tuple [ Dict , Dict , Any ] :
262262 """
263263 Decide a JWT without verifying the signature or any claims.
264264
265265 !!! Warning
266266 Treat unverified token claims with extreme caution.
267267 Nothing can be trusted until the token is verified.
268+
269+ Returns:
270+ Returns the decoded JWT header, payload, and signature
268271 """
269272 unverified_complete = jwt .decode_complete (token_str , options = {"verify_signature" : False }) # nosemgrep
270273 return unverified_complete ["header" ], unverified_complete ["payload" ], unverified_complete ["signature" ]
You can’t perform that action at this time.
0 commit comments