AADMixin Class
Mixin for Authentication object. Provides some AAD functionality:
Token caching and retrieval
Default AAD configuration
- Inheritance
-
AADMixin
Constructor
AADMixin(client_id: str, token: Dict[str, str])
Parameters
- client_id
- token
Methods
| refresh_session |
Return updated session if token has expired, attempts to refresh using newly acquired token. If a session object is provided, configure it directly. Otherwise, create a new session and return it. |
| set_token |
Should be used to define the self.token attribute. In this implementation, does nothing since the token is statically provided at creation. |
| signed_session |
Create token-friendly Requests session, using auto-refresh. Used internally when a request is made. If a session object is provided, configure it directly. Otherwise, create a new session and return it. |
refresh_session
Return updated session if token has expired, attempts to refresh using newly acquired token.
If a session object is provided, configure it directly. Otherwise, create a new session and return it.
refresh_session(session=None)
Parameters
- session
- <xref:requests.Session>
The session to configure for authentication
Return type
set_token
Should be used to define the self.token attribute.
In this implementation, does nothing since the token is statically provided at creation.
set_token()
signed_session
Create token-friendly Requests session, using auto-refresh. Used internally when a request is made.
If a session object is provided, configure it directly. Otherwise, create a new session and return it.
signed_session(session=None)
Parameters
- session
- <xref:requests.Session>
The session to configure for authentication
Attributes
cloud_environment
proxies
timeout
verify
Feedback
Submit and view feedback for