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

Public Member Functions

Credentials async_get_or_create_credentials (self, Mapping[str, str] flow_result)
 
LoginFlow async_login_flow (self, AuthFlowContext|None context)
 
UserMeta async_user_meta_for_credentials (self, Credentials credentials)
 
None async_validate_access (self, IPAddress ip_addr)
 
None async_validate_refresh_token (self, RefreshToken refresh_token, str|None remote_ip=None)
 
bool support_mfa (self)
 
list[IPNetworktrusted_networks (self)
 
list[IPNetworktrusted_proxies (self)
 
dict[IPNetwork, Any] trusted_users (self)
 

Static Public Attributes

string DEFAULT_TITLE = "Trusted Networks"
 

Detailed Description

Trusted Networks auth provider.

Allow passwordless access from trusted network.

Definition at line 73 of file trusted_networks.py.

Member Function Documentation

◆ async_get_or_create_credentials()

Credentials homeassistant.auth.providers.trusted_networks.TrustedNetworksAuthProvider.async_get_or_create_credentials (   self,
Mapping[str, str]   flow_result 
)
Get credentials based on the flow result.

Definition at line 147 of file trusted_networks.py.

◆ async_login_flow()

LoginFlow homeassistant.auth.providers.trusted_networks.TrustedNetworksAuthProvider.async_login_flow (   self,
AuthFlowContext | None  context 
)
Return a flow to login.

Definition at line 107 of file trusted_networks.py.

◆ async_user_meta_for_credentials()

UserMeta homeassistant.auth.providers.trusted_networks.TrustedNetworksAuthProvider.async_user_meta_for_credentials (   self,
Credentials   credentials 
)
Return extra user metadata for credentials.

Trusted network auth provider should never create new user.

Definition at line 175 of file trusted_networks.py.

◆ async_validate_access()

None homeassistant.auth.providers.trusted_networks.TrustedNetworksAuthProvider.async_validate_access (   self,
IPAddress  ip_addr 
)
Make sure the access from trusted networks.

Raise InvalidAuthError if not.
Raise InvalidAuthError if trusted_networks is not configured.

Definition at line 185 of file trusted_networks.py.

◆ async_validate_refresh_token()

None homeassistant.auth.providers.trusted_networks.TrustedNetworksAuthProvider.async_validate_refresh_token (   self,
RefreshToken  refresh_token,
str | None   remote_ip = None 
)
Verify a refresh token is still valid.

Definition at line 206 of file trusted_networks.py.

◆ support_mfa()

bool homeassistant.auth.providers.trusted_networks.TrustedNetworksAuthProvider.support_mfa (   self)
Trusted Networks auth provider does not support MFA.

Definition at line 103 of file trusted_networks.py.

◆ trusted_networks()

list[IPNetwork] homeassistant.auth.providers.trusted_networks.TrustedNetworksAuthProvider.trusted_networks (   self)
Return trusted networks.

Definition at line 82 of file trusted_networks.py.

◆ trusted_proxies()

list[IPNetwork] homeassistant.auth.providers.trusted_networks.TrustedNetworksAuthProvider.trusted_proxies (   self)
Return trusted proxies in the system.

Definition at line 92 of file trusted_networks.py.

◆ trusted_users()

dict[IPNetwork, Any] homeassistant.auth.providers.trusted_networks.TrustedNetworksAuthProvider.trusted_users (   self)
Return trusted users per network.

Definition at line 87 of file trusted_networks.py.

Member Data Documentation

◆ DEFAULT_TITLE

string homeassistant.auth.providers.trusted_networks.TrustedNetworksAuthProvider.DEFAULT_TITLE = "Trusted Networks"
static

Definition at line 79 of file trusted_networks.py.


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