keystoneauth1.extras.oauth1.v3 模块¶
OAuth 身份验证插件。
警告
此模块需要安装额外的包(oauthlib),默认情况下未安装。如果没有安装额外的包,将会发生导入错误。可以使用以下命令安装额外的包:
$ 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)
继承自
Auth- __abstractmethods__ = frozenset({})
- __annotations__ = {'MIN_TOKEN_LIFE_SECONDS': 'int', '_discovery_cache': 'dict[str, discover.Discover]', 'auth_ref': 'access.AccessInfo | None', 'auth_url': 'str', 'reauthenticate': 'bool'}
- __doc__ = None
- __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'
- _abc_impl = <_abc._abc_data object>
- _auth_method_class
别名
OAuth1Method
- class keystoneauth1.extras.oauth1.v3.OAuth1Method(*, access_key: str, access_secret: str, consumer_key: str, consumer_secret: str)
基类:
AuthMethod基于 OAuth 的身份验证方法。
- 参数:
access_key (字符串) – 访问令牌密钥。
access_secret (字符串) – 访问令牌密钥。
consumer_key (字符串) – 消费者密钥。
consumer_secret (字符串) – 消费者密钥。
- __abstractmethods__ = frozenset({})
- __annotations__ = {'_method_parameters': 'list[str] | None', 'access_key': <class 'str'>, 'access_secret': <class 'str'>, 'consumer_key': <class 'str'>, 'consumer_secret': <class 'str'>}
- __doc__ = '基于OAuth的认证方法。\n\n :param string access_key: 访问令牌密钥。\n :param string access_secret: 访问令牌密钥。\n :param string consumer_key: 消费者密钥。\n :param string consumer_secret: 消费者密钥。\n '
- __module__ = 'keystoneauth1.extras.oauth1.v3'
- _abc_impl = <_abc._abc_data object>
- access_key: str
- access_secret: str
- consumer_key: str
- consumer_secret: str