keystoneauth1.identity.v3.application_credential module

class keystoneauth1.identity.v3.application_credential.ApplicationCredential(auth_url: str, *args: Any, unscoped: bool = False, trust_id: str | None = None, system_scope: str | None = None, domain_id: str | None = None, domain_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, reauthenticate: bool = True, include_catalog: bool = True, **kwargs: Any)

Bases: AuthConstructor

A plugin for authenticating with an application credential.

Parameters:
  • auth_url (string) – Identity service endpoint for authentication.

  • application_credential_secret (string) – Application credential secret.

  • application_credential_id (string) – Application credential ID.

  • application_credential_name (string) – Application credential name.

  • 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.

  • 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', '_auth_method_class': 'ty.Type[AuthMethod]', '_discovery_cache': 'ty.Dict[str, discover.Discover]', 'auth_ref': 'ty.Optional[access.AccessInfo]', 'auth_url': 'str', 'reauthenticate': 'bool'}
__doc__ = "A plugin for authenticating with an application credential.\n\n    :param string auth_url: Identity service endpoint for authentication.\n    :param string application_credential_secret: Application credential secret.\n    :param string application_credential_id: Application credential ID.\n    :param string application_credential_name: Application credential name.\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    :param bool reauthenticate: Allow fetching a new token if the current one\n                                is going to expire. (optional) default True\n    "
__module__ = 'keystoneauth1.identity.v3.application_credential'
_abc_impl = <_abc._abc_data object>
_auth_method_class

alias of ApplicationCredentialMethod

_discovery_cache: ty.Dict[str, discover.Discover]
auth_ref: ty.Optional[access.AccessInfo]
auth_url: str
reauthenticate: bool
class keystoneauth1.identity.v3.application_credential.ApplicationCredentialMethod(**kwargs: object)

Bases: AuthMethod

Construct a User/Passcode based authentication method.

Parameters:
  • application_credential_secret (string) – Application credential secret.

  • application_credential_id (string) – Application credential id.

  • application_credential_name (string) – The name of the application credential, if an ID is not provided.

  • username (string) – Username for authentication, if an application credential ID is not provided.

  • user_id (string) – User ID for authentication, if an application credential ID is not provided.

  • user_domain_id (string) – User’s domain ID for authentication, if an application credential ID is not provided.

  • user_domain_name (string) – User’s domain name for authentication, if an application credential ID is not provided.

__abstractmethods__ = frozenset({})
__annotations__ = {'_method_parameters': 'ty.List[str]', 'application_credential_id': <class 'str'>, 'application_credential_name': <class 'str'>, 'application_credential_secret': <class 'str'>, 'user_domain_id': <class 'str'>, 'user_domain_name': <class 'str'>, 'user_id': <class 'str'>, 'username': <class 'str'>}
__doc__ = "Construct a User/Passcode based authentication method.\n\n    :param string application_credential_secret: Application credential secret.\n    :param string application_credential_id: Application credential id.\n    :param string application_credential_name: The name of the application\n                                               credential, if an ID is not\n                                               provided.\n    :param string username: Username for authentication, if an application\n                            credential ID is not provided.\n    :param string user_id: User ID for authentication, if an application\n                           credential ID is not provided.\n    :param string user_domain_id: User's domain ID for authentication, if an\n                                  application credential ID is not provided.\n    :param string user_domain_name: User's domain name for authentication, if\n                                    an application credential ID is not\n                                    provided.\n    "
__module__ = 'keystoneauth1.identity.v3.application_credential'
_abc_impl = <_abc._abc_data object>
_method_parameters: List[str] = ['application_credential_secret', 'application_credential_id', 'application_credential_name', 'user_id', 'username', 'user_domain_id', 'user_domain_name']
application_credential_id: str
application_credential_name: str
application_credential_secret: str
get_auth_data(session: Session, auth: Auth, headers: Dict[str, str], request_kwargs: Dict[str, object], **kwargs: Any) Tuple[None, None] | Tuple[str, Mapping[str, object]]

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[str, str | None]

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’.

user_domain_id: str
user_domain_name: str
user_id: str
username: str