External Auth Client
polaris.hub.external_client.ExternalAuthClient
Bases: OAuth2Client
This authentication client is used to obtain OAuth 2 tokens from Polaris's external OAuth2 server. These can in turn be used to obtain Polaris Hub tokens.
Internal use
This class is intended for internal use by the PolarisHubClient
class, and you should not have to
interact with it directly.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
settings
|
PolarisHubSettings
|
A |
required |
cache_auth_token
|
bool
|
Whether to cache the auth token to a file. |
True
|
**kwargs
|
dict
|
Additional keyword arguments passed to the authlib |
{}
|
user_info
property
Get information about the currently logged-in user through the OAuth2 User Info flow.
interactive_login
Login to the Polaris Hub using an interactive flow, through a Web browser.
Headless authentication
It is currently not possible to log in to the Polaris Hub without a browser. See this GitHub issue for more info.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
overwrite
|
bool
|
Whether to overwrite the current token if the user is already logged in. |
False
|
auto_open_browser
|
bool
|
Whether to automatically open the browser to visit the authorization URL. |
True
|