@@ -20,26 +20,31 @@ class BaseClient(object):
2020 # More on Client Types at https://tools.ietf.org/html/rfc6749#section-2.1
2121 def __init__ (
2222 self ,
23- client_id ,
24- client_secret = None , # Triggers HTTP AUTH for Confidential Client
25- client_assertion = None , # Assertion for Client Authentication
26- client_assertion_type = None , # The format of the client_assertion
27- default_body = None , # a dict to be sent in each token request,
28- # usually contains Confidential Client authentication parameters
29- # such as {'client_id': 'your_id', 'client_secret': 'secret'}
30- # if you choose to not use HTTP AUTH
31- configuration = None , # configuration dict of the authorization server
23+ client_id , # type: str
24+ client_secret = None , # type: Optional[str]
25+ client_assertion = None , # type: Optional[str]
26+ client_assertion_type = None , # type: Optional[str]
27+ default_body = None , # type: Optional[dict]
28+ configuration = None , # type: Optional[dict]
3229 ):
3330 """Initialize a client object to talk all the OAuth2 grants to the server.
3431
3532 Args:
33+ client_id (str): The client's id
34+ client_secret (str): Triggers HTTP AUTH for Confidential Client
3635 client_assertion (str):
3736 The client assertion to authenticate this client, per RFC 7521.
3837 client_assertion_type (str):
38+ The format of the client_assertion.
3939 If you leave it as the default None, this method will try to make
4040 a guess between SAML2 (RFC 7522) and JWT (RFC 7523),
4141 the only two profiles defined in RFC 7521.
4242 But you can also explicitly provide a value, if needed.
43+ default_body (dict):
44+ A dict to be sent in each token request body. For example,
45+ you could choose to set this as {"client_secret": "your secret"}
46+ if your authorization server wants it to be in the request body
47+ (rather than in the request header).
4348 configuration (dict):
4449 It contains the configuration (i.e. metadata) of the auth server.
4550 The actual content typically contains keys like
0 commit comments