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

Public Member Functions

None __init__ (self, *Any args, **Any kwargs)
 
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_login (self, str username, str password)
 

Static Public Attributes

tuple ALLOWED_META_KEYS
 
string DEFAULT_TITLE = "Command Line Authentication"
 

Detailed Description

Auth provider validating credentials by calling a command.

Definition at line 41 of file command_line.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.auth.providers.command_line.CommandLineAuthProvider.__init__ (   self,
*Any  args,
**Any  kwargs 
)
Extend parent's __init__.

Adds self._user_meta dictionary to hold the user-specific
attributes provided by external programs.

Definition at line 53 of file command_line.py.

Member Function Documentation

◆ async_get_or_create_credentials()

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

Definition at line 108 of file command_line.py.

◆ async_login_flow()

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

Definition at line 62 of file command_line.py.

◆ async_user_meta_for_credentials()

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

Currently, supports name, group and local_only.

Definition at line 120 of file command_line.py.

◆ async_validate_login()

None homeassistant.auth.providers.command_line.CommandLineAuthProvider.async_validate_login (   self,
str  username,
str  password 
)
Validate a username and password.

Definition at line 66 of file command_line.py.

Member Data Documentation

◆ ALLOWED_META_KEYS

tuple homeassistant.auth.providers.command_line.CommandLineAuthProvider.ALLOWED_META_KEYS
static
Initial value:
= (
"name",
"group",
"local_only",
)

Definition at line 47 of file command_line.py.

◆ DEFAULT_TITLE

string homeassistant.auth.providers.command_line.CommandLineAuthProvider.DEFAULT_TITLE = "Command Line Authentication"
static

Definition at line 44 of file command_line.py.


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