Skip to content

Commit

Permalink
docstring of public validate method
Browse files Browse the repository at this point in the history
  • Loading branch information
dlilue committed May 23, 2024
1 parent c8e17eb commit db9cb1c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fastapi_azure_auth/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ async def __call__(self, request: Request, security_scopes: SecurityScopes) -> O
raise

def validate(self, access_token: str, key: str, iss: str, options: Dict[str, Any]) -> Dict[str, Any]:
"""
Validates the token using the provided key and options.
"""
alg = 'RS256'
aud = self.app_client_id if self.token_version == 2 else f'api://{self.app_client_id}'
return jwt.decode(
Expand Down

0 comments on commit db9cb1c

Please sign in to comment.