# 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: 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: `Auth`

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

    alias of `OAuth1Method`

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

  Bases: `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_cache__ = {'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'
  __firstlineno__ = 41
  __init__(*, access_key: str, access_secret: str, consumer_key: str, consumer_secret: str) → None
  __module__ = 'keystoneauth1.extras.oauth1.v3'
  __static_attributes__ = ('access_key', 'access_secret', 'consumer_key', 'consumer_secret')
  _abc_impl = <_abc._abc_data object>
  access_key: str
  access_secret: str
  consumer_key: str
  consumer_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 (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’.

this page last updated: 2026-07-14 15:48:40

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug