|
| None | __init__ (self, HomeAssistant hass) |
| |
| None | add_auth (self, str username, str password) |
| |
| None | async_load (self) |
| |
| None | async_remove_auth (self, str username) |
| |
| None | async_save (self) |
| |
| None | change_password (self, str username, str new_password) |
| |
| None | change_username (self, str username, str new_username) |
| |
| bytes | hash_password (self, str password, bool for_storage=False) |
| |
| str | normalize_username (self, str username, *bool force_normalize=False) |
| |
| list[dict[str, str]] | users (self) |
| |
| None | validate_login (self, str username, str password) |
| |
Hold the user data.
Definition at line 80 of file homeassistant.py.
◆ __init__()
| None homeassistant.auth.providers.homeassistant.Data.__init__ |
( |
|
self, |
|
|
HomeAssistant |
hass |
|
) |
| |
◆ _async_check_for_not_normalized_usernames()
| None homeassistant.auth.providers.homeassistant.Data._async_check_for_not_normalized_usernames |
( |
|
self, |
|
|
dict[str, list[dict[str, str]]]
|
data |
|
) |
| |
|
private |
◆ _validate_new_username()
| None homeassistant.auth.providers.homeassistant.Data._validate_new_username |
( |
|
self, |
|
|
str |
new_username |
|
) |
| |
|
private |
Validate that username is normalized and unique.
Raises InvalidUsername if the new username is invalid.
Definition at line 238 of file homeassistant.py.
◆ add_auth()
| None homeassistant.auth.providers.homeassistant.Data.add_auth |
( |
|
self, |
|
|
str |
username, |
|
|
str |
password |
|
) |
| |
Add a new authenticated user/pass.
Raises InvalidUsername if the new username is invalid.
Definition at line 193 of file homeassistant.py.
◆ async_load()
| None homeassistant.auth.providers.homeassistant.Data.async_load |
( |
|
self | ) |
|
◆ async_remove_auth()
| None homeassistant.auth.providers.homeassistant.Data.async_remove_auth |
( |
|
self, |
|
|
str |
username |
|
) |
| |
◆ async_save()
| None homeassistant.auth.providers.homeassistant.Data.async_save |
( |
|
self | ) |
|
◆ change_password()
| None homeassistant.auth.providers.homeassistant.Data.change_password |
( |
|
self, |
|
|
str |
username, |
|
|
str |
new_password |
|
) |
| |
Update the password.
Raises InvalidUser if user cannot be found.
Definition at line 223 of file homeassistant.py.
◆ change_username()
| None homeassistant.auth.providers.homeassistant.Data.change_username |
( |
|
self, |
|
|
str |
username, |
|
|
str |
new_username |
|
) |
| |
Update the username.
Raises InvalidUser if user cannot be found.
Raises InvalidUsername if the new username is invalid.
Definition at line 262 of file homeassistant.py.
◆ hash_password()
| bytes homeassistant.auth.providers.homeassistant.Data.hash_password |
( |
|
self, |
|
|
str |
password, |
|
|
bool |
for_storage = False |
|
) |
| |
◆ normalize_username()
| str homeassistant.auth.providers.homeassistant.Data.normalize_username |
( |
|
self, |
|
|
str |
username, |
|
|
*bool |
force_normalize = False |
|
) |
| |
◆ users()
| list[dict[str, str]] homeassistant.auth.providers.homeassistant.Data.users |
( |
|
self | ) |
|
◆ validate_login()
| None homeassistant.auth.providers.homeassistant.Data.validate_login |
( |
|
self, |
|
|
str |
username, |
|
|
str |
password |
|
) |
| |
Validate a username and password.
Raises InvalidAuth if auth invalid.
Definition at line 160 of file homeassistant.py.
◆ _data
| homeassistant.auth.providers.homeassistant.Data._data |
|
private |
◆ _store
| homeassistant.auth.providers.homeassistant.Data._store |
|
private |
◆ hass
| homeassistant.auth.providers.homeassistant.Data.hass |
◆ is_legacy
| homeassistant.auth.providers.homeassistant.Data.is_legacy |
The documentation for this class was generated from the following file: