keystoneauth1.extras.oauth1.v3 module

Oauth authentication plugins.

Warning

This module requires installation of an extra package (oauthlib) not installed by default. Without the extra package an import error will occur. The extra package can be installed using:

$ pip install keystoneauth['oauth1']
class keystoneauth1.extras.oauth1.v3.OAuth1(auth_url: str, consumer_key: str, consumer_secret: str, access_key: str, access_secret: str, *, 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

__abstractmethods__ = frozenset({})
__doc__ = None
__init__(auth_url: str, consumer_key: str, consumer_secret: str, access_key: str, access_secret: str, *, 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.extras.oauth1.v3'
_abc_impl = <_abc._abc_data object>
_auth_method_class

alias of keystoneauth1.extras.oauth1.v3.OAuth1Method

auth_url: str
class keystoneauth1.extras.oauth1.v3.OAuth1Method(*, access_key: str, access_secret: str, consumer_key: str, consumer_secret: str)

Bases: keystoneauth1.identity.v3.base.AuthMethod

OAuth based authentication method.

Parameters
  • access_key (string) – Access token key.

  • access_secret (string) – Access token secret.

  • consumer_key (string) – Consumer key.

  • consumer_secret (string) – Consumer secret.

__abstractmethods__ = frozenset({})
__annotations__ = {'_method_parameters': 'ty.Optional[list[str]]', 'access_key': <class 'str'>, 'access_secret': <class 'str'>, 'consumer_key': <class 'str'>, 'consumer_secret': <class 'str'>}
__doc__ = 'OAuth based authentication method.\n\n :param string access_key: Access token key.\n :param string access_secret: Access token secret.\n :param string consumer_key: Consumer key.\n :param string consumer_secret: Consumer secret.\n '
__init__(*, access_key: str, access_secret: str, consumer_key: str, consumer_secret: str) → None

Initialize self. See help(type(self)) for accurate signature.

__module__ = 'keystoneauth1.extras.oauth1.v3'
_abc_impl = <_abc._abc_data object>
access_key: str
access_secret: str
consumer_key: str
consumer_secret: str
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’.