|
None | __init__ (self, RuntimeData runtime_data, int success=0, int error=84, bool debug=False) |
|
Union[str, None] | refresh_token (self, str provider_name, str refresh_link) |
|
Response | oauth_callback (self, Request request) |
|
Response | oauth_login (self, Request request) |
|
Response | add_oauth_provider (self, Request request, str provider="") |
|
Response | update_oauth_provider_data (self, Request request, str provider) |
|
Response | patch_oauth_provider_data (self, Request request, str provider) |
|
Response | delete_oauth_provider (self, Request request, str provider) |
|
|
Union[int, str] | _generate_oauth_authorization_url (self, str provider) |
|
| _exchange_code_for_token (self, str provider, str code) |
|
| _get_user_info (self, str provider, str access_token) |
|
Response | _oauth_user_logger (self, Dict user_info, str provider, list connection_data) |
|
Response | _handle_token_response (self, Dict token_response, str provider) |
|
The class that handle the oauth authentication
Definition at line 15 of file oauth_authentication.py.
◆ __init__()
None src.lib.components.oauth_authentication.OAuthAuthentication.__init__ |
( |
| self, |
|
|
RuntimeData | runtime_data, |
|
|
int | success = 0, |
|
|
int | error = 84, |
|
|
bool | debug = False ) |
_summary_
The constructor of the OAuth authentication class
Args:
runtime_data (RuntimeData): _description_: The initialised version of the runtime_data class.
success (int, optional): _description_. Defaults to 0.: The status code for success.
error (int, optional): _description_. Defaults to 84.: The status code for error.
debug (bool, optional): _description_. Defaults to False.: The info on if to activate debug mode.
Definition at line 20 of file oauth_authentication.py.
◆ _exchange_code_for_token()
src.lib.components.oauth_authentication.OAuthAuthentication._exchange_code_for_token |
( |
| self, |
|
|
str | provider, |
|
|
str | code ) |
|
protected |
◆ _generate_oauth_authorization_url()
Union[int, str] src.lib.components.oauth_authentication.OAuthAuthentication._generate_oauth_authorization_url |
( |
| self, |
|
|
str | provider ) |
|
protected |
◆ _get_user_info()
src.lib.components.oauth_authentication.OAuthAuthentication._get_user_info |
( |
| self, |
|
|
str | provider, |
|
|
str | access_token ) |
|
protected |
◆ _handle_token_response()
Response src.lib.components.oauth_authentication.OAuthAuthentication._handle_token_response |
( |
| self, |
|
|
Dict | token_response, |
|
|
str | provider ) |
|
protected |
The function that handle the response given by the provider for the oauth token
Definition at line 337 of file oauth_authentication.py.
◆ _oauth_user_logger()
Response src.lib.components.oauth_authentication.OAuthAuthentication._oauth_user_logger |
( |
| self, |
|
|
Dict | user_info, |
|
|
str | provider, |
|
|
list | connection_data ) |
|
protected |
◆ add_oauth_provider()
Response src.lib.components.oauth_authentication.OAuthAuthentication.add_oauth_provider |
( |
| self, |
|
|
Request | request, |
|
|
str | provider = "" ) |
◆ delete_oauth_provider()
Response src.lib.components.oauth_authentication.OAuthAuthentication.delete_oauth_provider |
( |
| self, |
|
|
Request | request, |
|
|
str | provider ) |
◆ oauth_callback()
Response src.lib.components.oauth_authentication.OAuthAuthentication.oauth_callback |
( |
| self, |
|
|
Request | request ) |
◆ oauth_login()
Response src.lib.components.oauth_authentication.OAuthAuthentication.oauth_login |
( |
| self, |
|
|
Request | request ) |
◆ patch_oauth_provider_data()
Response src.lib.components.oauth_authentication.OAuthAuthentication.patch_oauth_provider_data |
( |
| self, |
|
|
Request | request, |
|
|
str | provider ) |
◆ refresh_token()
Union[str, None] src.lib.components.oauth_authentication.OAuthAuthentication.refresh_token |
( |
| self, |
|
|
str | provider_name, |
|
|
str | refresh_link ) |
The function that use the given provider name and refresh link to generate a new token for oauth authentication
Definition at line 410 of file oauth_authentication.py.
◆ update_oauth_provider_data()
Response src.lib.components.oauth_authentication.OAuthAuthentication.update_oauth_provider_data |
( |
| self, |
|
|
Request | request, |
|
|
str | provider ) |
◆ debug
bool src.lib.components.oauth_authentication.OAuthAuthentication.debug = debug |
◆ disp
Disp src.lib.components.oauth_authentication.OAuthAuthentication.disp |
Initial value:= Disp(
TOML_CONF,
SAVE_TO_FILE,
FILE_NAME,
FILE_DESCRIPTOR,
debug=self.debug,
logger=self.__class__.__name__
)
Definition at line 35 of file oauth_authentication.py.
◆ error
int src.lib.components.oauth_authentication.OAuthAuthentication.error = error |
◆ runtime_data_initialised
RuntimeData src.lib.components.oauth_authentication.OAuthAuthentication.runtime_data_initialised = runtime_data |
◆ success
int src.lib.components.oauth_authentication.OAuthAuthentication.success = success |
The documentation for this class was generated from the following file: