File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1
1
from typing import Optional
2
2
from typing import Sequence
3
3
from typing import Type
4
+ from typing import Union
4
5
5
6
from social_core .backends .oauth import BaseOAuth2
6
7
8
+ from .claims import Claims
9
+
7
10
8
11
class OAuth2Client :
9
12
"""OAuth2 client configuration for a single provider."""
@@ -13,6 +16,7 @@ class OAuth2Client:
13
16
client_secret : str
14
17
redirect_uri : Optional [str ]
15
18
scope : Optional [Sequence [str ]]
19
+ claims : Optional [Union [Claims , dict ]]
16
20
17
21
def __init__ (
18
22
self ,
@@ -22,9 +26,11 @@ def __init__(
22
26
client_secret : str ,
23
27
redirect_uri : Optional [str ] = None ,
24
28
scope : Optional [Sequence [str ]] = None ,
29
+ claims : Optional [Union [Claims , dict ]] = None ,
25
30
) -> None :
26
31
self .backend = backend
27
32
self .client_id = client_id
28
33
self .client_secret = client_secret
29
34
self .redirect_uri = redirect_uri
30
35
self .scope = scope or []
36
+ self .claims = Claims (claims )
You can’t perform that action at this time.
0 commit comments