Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

these are all held within the exceptions module, not the main jwt module #1

Merged
merged 1 commit into from
Sep 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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