Home Assistant Unofficial Reference 2024.12.1
homeassistant.auth.providers.trusted_networks Namespace Reference

Classes

class  InvalidUserError
 
class  TrustedNetworksAuthProvider
 
class  TrustedNetworksLoginFlow
 

Variables

string CONF_ALLOW_BYPASS_LOGIN = "allow_bypass_login"
 
string CONF_GROUP = "group"
 
string CONF_TRUSTED_NETWORKS = "trusted_networks"
 
string CONF_TRUSTED_USERS = "trusted_users"
 
 CONFIG_SCHEMA
 
 IPAddress
 
 IPNetwork
 

Detailed Description

Trusted Networks auth provider.

It shows list of users if access from trusted network.
Abort login flow if not access from trusted network.

Variable Documentation

◆ CONF_ALLOW_BYPASS_LOGIN

string homeassistant.auth.providers.trusted_networks.CONF_ALLOW_BYPASS_LOGIN = "allow_bypass_login"

Definition at line 43 of file trusted_networks.py.

◆ CONF_GROUP

string homeassistant.auth.providers.trusted_networks.CONF_GROUP = "group"

Definition at line 42 of file trusted_networks.py.

◆ CONF_TRUSTED_NETWORKS

string homeassistant.auth.providers.trusted_networks.CONF_TRUSTED_NETWORKS = "trusted_networks"

Definition at line 40 of file trusted_networks.py.

◆ CONF_TRUSTED_USERS

string homeassistant.auth.providers.trusted_networks.CONF_TRUSTED_USERS = "trusted_users"

Definition at line 41 of file trusted_networks.py.

◆ CONFIG_SCHEMA

homeassistant.auth.providers.trusted_networks.CONFIG_SCHEMA
Initial value:
1 = AUTH_PROVIDER_SCHEMA.extend(
2  {
3  vol.Required(CONF_TRUSTED_NETWORKS): vol.All(cv.ensure_list, [ip_network]),
4  vol.Optional(CONF_TRUSTED_USERS, default={}): vol.Schema(
5  # we only validate the format of user_id or group_id
6  {
7  ip_network: vol.All(
8  cv.ensure_list,
9  [
10  vol.Or(
11  cv.uuid4_hex,
12  vol.Schema({vol.Required(CONF_GROUP): str}),
13  )
14  ],
15  )
16  }
17  ),
18  vol.Optional(CONF_ALLOW_BYPASS_LOGIN, default=False): cv.boolean,
19  },
20  extra=vol.PREVENT_EXTRA,
21 )

Definition at line 45 of file trusted_networks.py.

◆ IPAddress

homeassistant.auth.providers.trusted_networks.IPAddress

Definition at line 37 of file trusted_networks.py.

◆ IPNetwork

homeassistant.auth.providers.trusted_networks.IPNetwork

Definition at line 38 of file trusted_networks.py.