keystoneauth1.identity.v3.application_credential module¶
- class keystoneauth1.identity.v3.application_credential.ApplicationCredential(auth_url: str, application_credential_secret: str, application_credential_id: str | None = None, application_credential_name: str | None = None, user_id: str | None = None, username: str | None = None, user_domain_id: str | None = None, user_domain_name: str | None = None, *, 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)
Bases:
AuthA plugin for authenticating with an application credential.
- Parameters:
auth_url – Identity service endpoint for authentication.
application_credential_secret – Application credential secret.
application_credential_id – Application credential ID.
application_credential_name – Application credential name.
username – Username for authentication.
user_id – User ID for authentication.
user_domain_id – User’s domain ID for authentication.
user_domain_name – User’s domain name for authentication.
reauthenticate – Allow fetching a new token if the current one is going to expire. (optional) default True
- __abstractmethods__ = frozenset({})
- __annotations__ = {}
- __doc__ = "A plugin for authenticating with an application credential.\n\n :param auth_url: Identity service endpoint for authentication.\n :param application_credential_secret: Application credential secret.\n :param application_credential_id: Application credential ID.\n :param application_credential_name: Application credential name.\n :param username: Username for authentication.\n :param user_id: User ID for authentication.\n :param user_domain_id: User's domain ID for authentication.\n :param user_domain_name: User's domain name for authentication.\n :param reauthenticate: Allow fetching a new token if the current one is\n going to expire. (optional) default True\n "
- __init__(auth_url: str, application_credential_secret: str, application_credential_id: str | None = None, application_credential_name: str | None = None, user_id: str | None = None, username: str | None = None, user_domain_id: str | None = None, user_domain_name: str | None = None, *, 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) None
- __module__ = 'keystoneauth1.identity.v3.application_credential'
- _abc_impl = <_abc._abc_data object>
- _auth_method_class
alias of
ApplicationCredentialMethod
- class keystoneauth1.identity.v3.application_credential.ApplicationCredentialMethod(*, application_credential_secret: str, application_credential_id: str | None = None, application_credential_name: str | None = None, user_id: str | None = None, username: str | None = None, user_domain_id: str | None = None, user_domain_name: str | None = None)
Bases:
AuthMethodConstruct a User/Passcode based authentication method.
- Parameters:
application_credential_secret – Application credential secret.
application_credential_id – Application credential id.
application_credential_name – The name of the application credential, if an ID is not provided.
username – Username for authentication, if an application credential ID is not provided.
user_id – User ID for authentication, if an application credential ID is not provided.
user_domain_id – User’s domain ID for authentication, if an application credential ID is not provided.
user_domain_name – User’s domain name for authentication, if an application credential ID is not provided.
- __abstractmethods__ = frozenset({})
- __annotations__ = {'application_credential_id': str | None, 'application_credential_name': str | None, 'application_credential_secret': <class 'str'>, 'user_domain_id': str | None, 'user_domain_name': str | None, 'user_id': str | None, 'username': str | None}
- __doc__ = "Construct a User/Passcode based authentication method.\n\n :param application_credential_secret: Application credential secret.\n :param application_credential_id: Application credential id.\n :param application_credential_name: The name of the application\n credential, if an ID is not provided.\n :param username: Username for authentication, if an application credential\n ID is not provided.\n :param user_id: User ID for authentication, if an application credential ID\n is not provided.\n :param user_domain_id: User's domain ID for authentication, if an\n application credential ID is not provided.\n :param user_domain_name: User's domain name for authentication, if an\n application credential ID is not provided.\n "
- __init__(*, application_credential_secret: str, application_credential_id: str | None = None, application_credential_name: str | None = None, user_id: str | None = None, username: str | None = None, user_domain_id: str | None = None, user_domain_name: str | None = None) None
- __module__ = 'keystoneauth1.identity.v3.application_credential'
- _abc_impl = <_abc._abc_data object>
- application_credential_secret: str
- get_auth_data(session: Session, auth: Auth, headers: dict[str, str], request_kwargs: dict[str, object]) tuple[None, None] | tuple[str, Mapping[str, object]]
Return the authentication section of an auth plugin.
- Parameters:
session – The communication session.
auth – The auth plugin calling the method.
headers – 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.
- 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’.