Skip to content

Commit

Permalink
postpone annotation evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdalilue committed May 29, 2024
1 parent 94f11c6 commit d7d4f29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions fastapi_azure_auth/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

if TYPE_CHECKING: # pragma: no cover
from jwt.algorithms import AllowedPublicKeys
else:
AllowedPublicKeys = Any

log = logging.getLogger('fastapi_azure_auth')

Expand Down Expand Up @@ -250,7 +248,9 @@ async def extract_access_token(self, request: Request) -> Optional[str]:
"""
return await self.oauth(request=request)

def validate(self, access_token: str, key: AllowedPublicKeys, iss: str, options: Dict[str, Any]) -> Dict[str, Any]:
def validate(
self, access_token: str, key: 'AllowedPublicKeys', iss: str, options: Dict[str, Any]
) -> Dict[str, Any]:
"""
Validates the token using the provided key and options.
"""
Expand Down
4 changes: 1 addition & 3 deletions fastapi_azure_auth/openid_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

if TYPE_CHECKING: # pragma: no cover
from jwt.algorithms import AllowedPublicKeys
else:
AllowedPublicKeys = Any

log = logging.getLogger('fastapi_azure_auth')

Expand All @@ -31,7 +29,7 @@ def __init__(
self.config_url = config_url

self.authorization_endpoint: str
self.signing_keys: dict[str, AllowedPublicKeys]
self.signing_keys: dict[str, 'AllowedPublicKeys']
self.token_endpoint: str
self.issuer: str

Expand Down

0 comments on commit d7d4f29

Please sign in to comment.