Public Member Functions | |
| str | async_generate_authorize_url (self, str flow_id) |
| dict | async_refresh_token (self, dict token) |
| dict | async_resolve_external_data (self, Any external_data) |
| str | domain (self) |
| str | name (self) |
Private Member Functions | |
| dict | _async_refresh_token (self, dict token) |
Base class to abstract OAuth2 authentication.
Definition at line 58 of file config_entry_oauth2_flow.py.
|
private |
Refresh a token.
Reimplemented in homeassistant.helpers.config_entry_oauth2_flow.LocalOAuth2Implementation.
Definition at line 110 of file config_entry_oauth2_flow.py.
| str homeassistant.helpers.config_entry_oauth2_flow.AbstractOAuth2Implementation.async_generate_authorize_url | ( | self, | |
| str | flow_id | ||
| ) |
Generate a url for the user to authorize.
This step is called when a config flow is initialized. It should redirect the
user to the vendor website where they can authorize Home Assistant.
The implementation is responsible to get notified when the user is authorized
and pass this to the specified config flow. Do as little work as possible once
notified. You can do the work inside async_resolve_external_data. This will
give the best UX.
Pass external data in with:
await hass.config_entries.flow.async_configure(
flow_id=flow_id, user_input={'code': 'abcd', 'state': … }
)
Reimplemented in homeassistant.helpers.config_entry_oauth2_flow.LocalOAuth2Implementation.
Definition at line 72 of file config_entry_oauth2_flow.py.
| dict homeassistant.helpers.config_entry_oauth2_flow.AbstractOAuth2Implementation.async_refresh_token | ( | self, | |
| dict | token | ||
| ) |
Refresh a token and update expires info.
Definition at line 101 of file config_entry_oauth2_flow.py.
| dict homeassistant.helpers.config_entry_oauth2_flow.AbstractOAuth2Implementation.async_resolve_external_data | ( | self, | |
| Any | external_data | ||
| ) |
Resolve external data to tokens. Turn the data that the implementation passed to the config flow as external step data into tokens. These tokens will be stored as 'token' in the config entry data.
Reimplemented in homeassistant.helpers.config_entry_oauth2_flow.LocalOAuth2Implementation.
Definition at line 93 of file config_entry_oauth2_flow.py.
| str homeassistant.helpers.config_entry_oauth2_flow.AbstractOAuth2Implementation.domain | ( | self | ) |
Domain that is providing the implementation.
Reimplemented in homeassistant.helpers.config_entry_oauth2_flow.LocalOAuth2Implementation.
Definition at line 68 of file config_entry_oauth2_flow.py.
| str homeassistant.helpers.config_entry_oauth2_flow.AbstractOAuth2Implementation.name | ( | self | ) |
Name of the implementation.
Reimplemented in homeassistant.helpers.config_entry_oauth2_flow.LocalOAuth2Implementation, and homeassistant.components.ondilo_ico.oauth_impl.OndiloOauth2Implementation.
Definition at line 63 of file config_entry_oauth2_flow.py.