keystoneauth1.identity.generic.password module

class keystoneauth1.identity.generic.password.Password(auth_url: str, username: str | None = None, user_id: str | None = None, password: str | None = None, user_domain_id: str | None = None, user_domain_name: str | None = None, tenant_id: str | None = None, tenant_name: str | None = None, project_id: str | None = None, project_name: str | None = None, project_domain_id: str | None = None, project_domain_name: str | None = None, domain_id: str | None = None, domain_name: str | None = None, system_scope: str | None = None, trust_id: str | None = None, default_domain_id: str | None = None, default_domain_name: str | None = None, reauthenticate: bool = True)

Bases: BaseGenericPlugin

A common user/password authentication plugin.

Parameters:
  • username (string) – Username for authentication.

  • user_id (string) – User ID for authentication.

  • password (string) – Password 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__ = {'MIN_TOKEN_LIFE_SECONDS': 'int', '_discovery_cache': 'ty.Dict[str, discover.Discover]', '_plugin': 'ty.Union[v2.Auth, v3.AuthConstructor, None]', 'auth_ref': 'ty.Optional[access.AccessInfo]', 'auth_url': 'str', 'reauthenticate': 'bool'}
__doc__ = "A common user/password authentication plugin.\n\n    :param string username: Username for authentication.\n    :param string user_id: User ID for authentication.\n    :param string password: Password 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__(auth_url: str, username: str | None = None, user_id: str | None = None, password: str | None = None, user_domain_id: str | None = None, user_domain_name: str | None = None, tenant_id: str | None = None, tenant_name: str | None = None, project_id: str | None = None, project_name: str | None = None, project_domain_id: str | None = None, project_domain_name: str | None = None, domain_id: str | None = None, domain_name: str | None = None, system_scope: str | None = None, trust_id: str | None = None, default_domain_id: str | None = None, default_domain_name: str | None = None, reauthenticate: bool = True)
__module__ = 'keystoneauth1.identity.generic.password'
_abc_impl = <_abc._abc_data object>
_discovery_cache: ty.Dict[str, discover.Discover]
_plugin: ty.Union[v2.Auth, v3.AuthConstructor, None]
auth_ref: ty.Optional[access.AccessInfo]
auth_url: str
create_plugin(session: Session, version: Tuple[int | float, ...], url: str, raw_status: str | None = None) None | Password | Password

Create a plugin from the given parameters.

This function will be called multiple times with the version and url of a potential endpoint. If a plugin can be constructed that fits the params then it should return it. If not return None and then another call will be made with other available URLs.

Parameters:
  • session (keystoneauth1.session.Session) – A session object.

  • version (tuple) – A tuple of the API version at the URL.

  • url (str) – The base URL for this version.

  • raw_status (str) – The status that was in the discovery field.

Returns:

A plugin that can match the parameters or None if nothing.

get_cache_id_elements() Dict[str, str | None]

Get the elements for this auth plugin that make it unique.

As part of the get_cache_id requirement we need to determine what aspects of this plugin and its values that make up the unique elements.

This should be overridden by plugins that wish to allow caching.

Returns:

The unique attributes and values of this plugin.

Return type:

A flat dict with a str key and str or None value. This is required as we feed these values into a hash. Pairs where the value is None are ignored in the hashed id.

reauthenticate: bool
property user_domain_id: str | None
property user_domain_name: str | None