keystoneauth1.identity.v3.password module¶
-
class
keystoneauth1.identity.v3.password.
Password
(auth_url: str, password: str, user_id: Optional[str] = None, username: Optional[str] = None, user_domain_id: Optional[str] = None, user_domain_name: Optional[str] = None, *, unscoped: bool = False, trust_id: Optional[str] = None, system_scope: Optional[str] = None, domain_id: Optional[str] = None, domain_name: Optional[str] = None, project_id: Optional[str] = None, project_name: Optional[str] = None, project_domain_id: Optional[str] = None, project_domain_name: Optional[str] = None, reauthenticate: bool = True, include_catalog: bool = True) Bases:
keystoneauth1.identity.v3.base.Auth
A plugin for authenticating with a username and password.
- Parameters
auth_url (string) – Identity service endpoint for authentication.
password (string) – Password for authentication.
user_id (string) – User ID for authentication.
username (string) – Username for authentication.
user_domain_id (string) – User’s domain ID for authentication.
user_domain_name (string) – User’s domain name for authentication.
trust_id (string) – Trust ID for trust scoping.
system_scope (string) – System information to scope to.
domain_id (string) – Domain ID for domain scoping.
domain_name (string) – Domain name for domain scoping.
project_id (string) – Project ID for project scoping.
project_name (string) – Project name for project scoping.
project_domain_id (string) – Project’s domain ID for project.
project_domain_name (string) – Project’s domain name for project.
reauthenticate (bool) – Allow fetching a new token if the current one is going to expire. (optional) default True
-
__abstractmethods__
= frozenset({})
-
__annotations__
= {'MIN_TOKEN_LIFE_SECONDS': 'int', '_discovery_cache': 'dict[str, discover.Discover]', 'auth_ref': 'ty.Optional[access.AccessInfo]', 'auth_url': <class 'str'>, 'reauthenticate': 'bool'}
-
__doc__
= "A plugin for authenticating with a username and password.\n\n :param string auth_url: Identity service endpoint for authentication.\n :param string password: Password for authentication.\n :param string user_id: User ID for authentication.\n :param string username: Username for authentication.\n :param string user_domain_id: User's domain ID for authentication.\n :param string user_domain_name: User's domain name for authentication.\n :param string trust_id: Trust ID for trust scoping.\n :param string system_scope: System information to scope to.\n :param string domain_id: Domain ID for domain scoping.\n :param string domain_name: Domain name for domain scoping.\n :param string project_id: Project ID for project scoping.\n :param string project_name: Project name for project scoping.\n :param string project_domain_id: Project's domain ID for project.\n :param string project_domain_name: Project's domain name for project.\n :param bool reauthenticate: Allow fetching a new token if the current one\n is going to expire. (optional) default True\n "
-
__init__
(auth_url: str, password: str, user_id: Optional[str] = None, username: Optional[str] = None, user_domain_id: Optional[str] = None, user_domain_name: Optional[str] = None, *, unscoped: bool = False, trust_id: Optional[str] = None, system_scope: Optional[str] = None, domain_id: Optional[str] = None, domain_name: Optional[str] = None, project_id: Optional[str] = None, project_name: Optional[str] = None, project_domain_id: Optional[str] = None, project_domain_name: Optional[str] = None, reauthenticate: bool = True, include_catalog: bool = True) → None Initialize self. See help(type(self)) for accurate signature.
-
__module__
= 'keystoneauth1.identity.v3.password'
-
_abc_impl
= <_abc._abc_data object>
-
_auth_method_class
alias of
keystoneauth1.identity.v3.password.PasswordMethod
-
_discovery_cache
: dict[str, discover.Discover]
-
auth_ref
: ty.Optional[access.AccessInfo]
-
auth_url
: str
-
reauthenticate
: bool
-
class
keystoneauth1.identity.v3.password.
PasswordMethod
(*, password: str, user_id: Optional[str] = None, username: Optional[str] = None, user_domain_id: Optional[str] = None, user_domain_name: Optional[str] = None) Bases:
keystoneauth1.identity.v3.base.AuthMethod
Construct a User/Password based authentication method.
- Parameters
password (string) – Password for authentication.
username (string) – Username for authentication.
user_id (string) – User ID for authentication.
user_domain_id (string) – User’s domain ID for authentication.
user_domain_name (string) – User’s domain name for authentication.
-
__abstractmethods__
= frozenset({})
-
__annotations__
= {'_method_parameters': 'ty.Optional[list[str]]', 'password': <class 'str'>, 'user_domain_id': typing.Optional[str], 'user_domain_name': typing.Optional[str], 'user_id': typing.Optional[str], 'username': typing.Optional[str]}
-
__doc__
= "Construct a User/Password based authentication method.\n\n :param string password: Password for authentication.\n :param string username: Username for authentication.\n :param string user_id: User ID for authentication.\n :param string user_domain_id: User's domain ID for authentication.\n :param string user_domain_name: User's domain name for authentication.\n "
-
__init__
(*, password: str, user_id: Optional[str] = None, username: Optional[str] = None, user_domain_id: Optional[str] = None, user_domain_name: Optional[str] = None) → None Initialize self. See help(type(self)) for accurate signature.
-
__module__
= 'keystoneauth1.identity.v3.password'
-
_abc_impl
= <_abc._abc_data object>
-
get_auth_data
(session: keystoneauth1.session.Session, auth: keystoneauth1.identity.v3.base.Auth, headers: dict, request_kwargs: dict) → Union[tuple, tuple] Return the authentication section of an auth plugin.
- Parameters
session (keystoneauth1.session.Session) – The communication session.
auth (base.Auth) – The auth plugin calling the method.
headers (dict) – The headers that will be sent with the auth request if a plugin needs to add to them.
- Returns
The identifier of this plugin and a dict of authentication data for the auth type.
- Return type
tuple(string, dict)
-
get_cache_id_elements
() → dict Get the elements for this auth method that make it unique.
These elements will be used as part of the
keystoneauth1.plugin.BaseIdentityPlugin.get_cache_id()
to allow caching of the auth plugin.Plugins should override this if they want to allow caching of their state.
To avoid collision or overrides the keys of the returned dictionary should be prefixed with the plugin identifier. For example the password plugin returns its username value as ‘password_username’.
-
password
: str
-
user_domain_id
: Optional[str] = None
-
user_domain_name
: Optional[str] = None
-
user_id
: Optional[str] = None
-
username
: Optional[str] = None