Skip to content

Commit

Permalink
Merge pull request #1 from ironslob/master
Browse files Browse the repository at this point in the history
these are all held within the exceptions module, not the main jwt module
  • Loading branch information
IndominusByte committed Sep 24, 2020
2 parents 2462eae + 97d2797 commit 8c5f897
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions fastapi_jwt_auth/JWTAuthorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,27 +106,27 @@ def _verified_token(self,encoded_token: bytes) -> Dict[str,Union[str,int,bool]]:
self._secret_key,
algorithms=self._algorithm
)
except jwt.ExpiredSignatureError as err:
except jwt.exceptions.ExpiredSignatureError as err:
raise HTTPException(status_code=422,detail=str(err))
except jwt.DecodeError as err:
except jwt.exceptions.DecodeError as err:
raise HTTPException(status_code=422,detail=str(err))
except jwt.InvalidAlgorithmError as err:
except jwt.exceptions.InvalidAlgorithmError as err:
raise HTTPException(status_code=422,detail=str(err))
except jwt.InvalidKeyError as err:
except jwt.exceptions.InvalidKeyError as err:
raise HTTPException(status_code=422,detail=str(err))
except jwt.InvalidTokenError as err:
except jwt.exceptions.InvalidTokenError as err:
raise HTTPException(status_code=422,detail=str(err))
except jwt.InvalidIssuerError as err:
except jwt.exceptions.InvalidIssuerError as err:
raise HTTPException(status_code=422,detail=str(err))
except jwt.InvalidAudienceError as err:
except jwt.exceptions.InvalidAudienceError as err:
raise HTTPException(status_code=422,detail=str(err))
except jwt.InvalidIssuedAtError as err:
except jwt.exceptions.InvalidIssuedAtError as err:
raise HTTPException(status_code=422,detail=str(err))
except jwt.InvalidSignatureError as err:
except jwt.exceptions.InvalidSignatureError as err:
raise HTTPException(status_code=422,detail=str(err))
except jwt.ImmatureSignatureError as err:
except jwt.exceptions.ImmatureSignatureError as err:
raise HTTPException(status_code=422,detail=str(err))
except jwt.MissingRequiredClaimError as err:
except jwt.exceptions.MissingRequiredClaimError as err:
raise HTTPException(status_code=422,detail=str(err))

@classmethod
Expand Down

0 comments on commit 8c5f897

Please sign in to comment.