Public Member Functions | |
| None | __init__ (self, *Any args, **Any kwargs) |
| None | async_add_auth (self, str username, str password) |
| None | async_change_password (self, str username, str new_password) |
| None | async_change_username (self, Credentials credential, str new_username) |
| Credentials | async_get_or_create_credentials (self, Mapping[str, str] flow_result) |
| None | async_initialize (self) |
| LoginFlow | async_login_flow (self, AuthFlowContext|None context) |
| None | async_remove_auth (self, str username) |
| UserMeta | async_user_meta_for_credentials (self, Credentials credentials) |
| None | async_validate_login (self, str username, str password) |
| None | async_will_remove_credentials (self, Credentials credentials) |
Public Attributes | |
| data | |
Static Public Attributes | |
| string | DEFAULT_TITLE = "Home Assistant Local" |
Private Attributes | |
| _init_lock | |
Auth provider based on a local storage of users in Home Assistant config dir.
Definition at line 287 of file homeassistant.py.
| None homeassistant.auth.providers.homeassistant.HassAuthProvider.__init__ | ( | self, | |
| *Any | args, | ||
| **Any | kwargs | ||
| ) |
Initialize an Home Assistant auth provider.
Definition at line 292 of file homeassistant.py.
| None homeassistant.auth.providers.homeassistant.HassAuthProvider.async_add_auth | ( | self, | |
| str | username, | ||
| str | password | ||
| ) |
Call add_auth on data.
Definition at line 322 of file homeassistant.py.
| None homeassistant.auth.providers.homeassistant.HassAuthProvider.async_change_password | ( | self, | |
| str | username, | ||
| str | new_password | ||
| ) |
Call change_password on data.
Definition at line 340 of file homeassistant.py.
| None homeassistant.auth.providers.homeassistant.HassAuthProvider.async_change_username | ( | self, | |
| Credentials | credential, | ||
| str | new_username | ||
| ) |
Validate new username and change it including updating credentials object.
Definition at line 351 of file homeassistant.py.
| Credentials homeassistant.auth.providers.homeassistant.HassAuthProvider.async_get_or_create_credentials | ( | self, | |
| Mapping[str, str] | flow_result | ||
| ) |
Get credentials based on the flow result.
Definition at line 365 of file homeassistant.py.
| None homeassistant.auth.providers.homeassistant.HassAuthProvider.async_initialize | ( | self | ) |
Initialize the auth provider.
Definition at line 298 of file homeassistant.py.
| LoginFlow homeassistant.auth.providers.homeassistant.HassAuthProvider.async_login_flow | ( | self, | |
| AuthFlowContext | None | context | ||
| ) |
Return a flow to login.
Definition at line 308 of file homeassistant.py.
| None homeassistant.auth.providers.homeassistant.HassAuthProvider.async_remove_auth | ( | self, | |
| str | username | ||
| ) |
Call remove_auth on data.
Definition at line 331 of file homeassistant.py.
| UserMeta homeassistant.auth.providers.homeassistant.HassAuthProvider.async_user_meta_for_credentials | ( | self, | |
| Credentials | credentials | ||
| ) |
Get extra info for this credential.
Definition at line 383 of file homeassistant.py.
| None homeassistant.auth.providers.homeassistant.HassAuthProvider.async_validate_login | ( | self, | |
| str | username, | ||
| str | password | ||
| ) |
Validate a username and password.
Definition at line 312 of file homeassistant.py.
| None homeassistant.auth.providers.homeassistant.HassAuthProvider.async_will_remove_credentials | ( | self, | |
| Credentials | credentials | ||
| ) |
When credentials get removed, also remove the auth.
Definition at line 389 of file homeassistant.py.
|
private |
Definition at line 296 of file homeassistant.py.
| homeassistant.auth.providers.homeassistant.HassAuthProvider.data |
Definition at line 306 of file homeassistant.py.
|
static |
Definition at line 290 of file homeassistant.py.