INNER CODE UNIT · Python
_verifying_token
IndominusByte/fastapi-jwt-auth · fastapi_jwt_auth/auth_jwt.py:627
def _verifying_token(self,encoded_token: str, issuer: Optional[str] = None) -> None:
"""
Verified token and check if token is revoked
:param encoded_token: token hash
:param issuer: expected issuer in the JWT
"""
raw_token = self._verified_token(encoded_token,issuer)
if raw_token['type'] in self._denylist_token_checks:
self._check_token_is_revoked(raw_token)
def _verified_token(self,encoded_token: str, issuer: Optional[str] = None) -> Dict[str,Union[str,int,bool]]:
"""
Verified token and catch all error from jwt package and return decode token
:param encoded_token: token hash
:param issuer: expected issuer in the JWT