keystoneauth1.identity.v2.
Auth
(auth_url, trust_id=None, tenant_id=None, tenant_name=None, reauthenticate=True)¶Bases: keystoneauth1.identity.base.BaseIdentityPlugin
Identity V2 Authentication Plugin.
Parameters: |
|
---|
get_auth_data
(headers=None)¶Return the authentication section of an auth plugin.
Parameters: | headers (dict) – The headers that will be sent with the auth request if a plugin needs to add to them. |
---|---|
Returns: | A dict of authentication data for the auth type. |
Return type: | dict |
get_auth_ref
(session, **kwargs)¶Obtain a token from an OpenStack Identity Service.
This method is overridden by the various token version plugins.
This function should not be called independently and is expected to be invoked via the do_authenticate function.
This function will be invoked if the AcessInfo object cached by the plugin is not valid. Thus plugins should always fetch a new AccessInfo when invoked. If you are looking to just retrieve the current auth data then you should use get_access.
Parameters: | session (keystoneauth1.session.Session) – A session object that can be used for communication. |
---|---|
Raises: |
|
Returns: | Token access information. |
Return type: |
has_scope_parameters
¶Return true if parameters can be used to create a scoped token.
keystoneauth1.identity.v2.
Password
(auth_url, username=<object object>, password=None, user_id=<object object>, **kwargs)¶Bases: keystoneauth1.identity.v2.Auth
A plugin for authenticating with a username and password.
A username or user_id must be provided.
Parameters: |
|
---|---|
Raises: | TypeError – if a user_id or username is not provided. |
get_auth_data
(headers=None)¶Return the authentication section of an auth plugin.
Parameters: | headers (dict) – The headers that will be sent with the auth request if a plugin needs to add to them. |
---|---|
Returns: | A dict of authentication data for the auth type. |
Return type: | dict |
get_cache_id_elements
()¶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. |
keystoneauth1.identity.v2.
Token
(auth_url, token, **kwargs)¶Bases: keystoneauth1.identity.v2.Auth
A plugin for authenticating with an existing token.
Parameters: |
|
---|
get_auth_data
(headers=None)¶Return the authentication section of an auth plugin.
Parameters: | headers (dict) – The headers that will be sent with the auth request if a plugin needs to add to them. |
---|---|
Returns: | A dict of authentication data for the auth type. |
Return type: | dict |
get_cache_id_elements
()¶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. |
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.