hermes.commands.init.util.oauth_process
Attributes
Classes
Simple implementation of BaseHTTPRequestHandler for getting oauth responses |
Functions
This makes requests_oauthlib.oauth2_session print all the debug logs onto the console. |
|
|
Tries to read the response_text as Json-String to return it as dict. |
|
Module Contents
- hermes.commands.init.util.oauth_process.setup_logging_for_oauthlib()
This makes requests_oauthlib.oauth2_session print all the debug logs onto the console. It only works if the hermes logger is deactivated.
- hermes.commands.init.util.oauth_process.parse_response_to_dict(response_text: str) dict
Tries to read the response_text as Json-String to return it as dict. If that fails, it tries to read it as query string.
- class hermes.commands.init.util.oauth_process.OauthProcess(name: str, client_id: str = '', client_secret: str = '', authorize_url: str = '', token_url: str = '', scope: str = '', local_port: int = 5333, device_code_url: str = '')
-
- get_tokens_from_refresh_token(refresh_token: str) dict[str:str]
Returns access and refresh token as dict using a refresh token
- class hermes.commands.init.util.oauth_process.Handler(*args, oauth_process: OauthProcess = None, **kwargs)
Bases:
http.server.BaseHTTPRequestHandlerSimple implementation of BaseHTTPRequestHandler for getting oauth responses