Home Assistant Unofficial Reference 2024.12.1
homeassistant.auth.providers.homeassistant.HassAuthProvider Class Reference
Inheritance diagram for homeassistant.auth.providers.homeassistant.HassAuthProvider:
[legend]
Collaboration diagram for homeassistant.auth.providers.homeassistant.HassAuthProvider:
[legend]

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
 

Detailed Description

Auth provider based on a local storage of users in Home Assistant config dir.

Definition at line 287 of file homeassistant.py.

Constructor & Destructor Documentation

◆ __init__()

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.

Member Function Documentation

◆ async_add_auth()

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.

◆ async_change_password()

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.

◆ async_change_username()

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.

◆ async_get_or_create_credentials()

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.

◆ async_initialize()

None homeassistant.auth.providers.homeassistant.HassAuthProvider.async_initialize (   self)
Initialize the auth provider.

Definition at line 298 of file homeassistant.py.

◆ async_login_flow()

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.

◆ async_remove_auth()

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.

◆ async_user_meta_for_credentials()

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.

◆ async_validate_login()

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.

◆ async_will_remove_credentials()

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.

Member Data Documentation

◆ _init_lock

homeassistant.auth.providers.homeassistant.HassAuthProvider._init_lock
private

Definition at line 296 of file homeassistant.py.

◆ data

homeassistant.auth.providers.homeassistant.HassAuthProvider.data

Definition at line 306 of file homeassistant.py.

◆ DEFAULT_TITLE

string homeassistant.auth.providers.homeassistant.HassAuthProvider.DEFAULT_TITLE = "Home Assistant Local"
static

Definition at line 290 of file homeassistant.py.


The documentation for this class was generated from the following file: