Skip to content

Commit 49115c9

Browse files
committed
GH-9: Add the claims attribute
1 parent 6cdfddc commit 49115c9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/fastapi_oauth2/core.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from starlette.requests import Request
1717
from starlette.responses import RedirectResponse
1818

19+
from .claims import Claims
1920
from .client import OAuth2Client
2021

2122

@@ -47,6 +48,7 @@ class OAuth2Core:
4748
client_secret: str = None
4849
callback_url: Optional[str] = None
4950
scope: Optional[List[str]] = None
51+
claims: Optional[Claims] = None
5052
backend: BaseOAuth2 = None
5153
_oauth_client: Optional[WebApplicationClient] = None
5254

@@ -56,7 +58,8 @@ class OAuth2Core:
5658
def __init__(self, client: OAuth2Client) -> None:
5759
self.client_id = client.client_id
5860
self.client_secret = client.client_secret
59-
self.scope = client.scope or self.scope
61+
self.scope = client.scope
62+
self.claims = client.claims
6063
self.provider = client.backend.name
6164
self.redirect_uri = client.redirect_uri
6265
self.backend = client.backend(OAuth2Strategy())

0 commit comments

Comments
 (0)