AuthProvider
(credentials, scope='project')[source]¶Provide authentication
auth_data
¶Auth data for set scope
auth_request
(method, url, headers=None, body=None, filters=None)[source]¶Obtains auth data and decorates a request with that.
Parameters: |
|
---|---|
Returns: | a Tuple (url, headers, body) |
clear_auth
()[source]¶Clear access cache
Can be called to clear the access cache so that next request will fetch a new token and base_url.
scope
¶Scope used in auth requests
set_alt_auth_data
(request_part, auth_data)[source]¶Alternate auth data on next request
Configure auth provider to provide alt authentication data on a part of the next auth_request. If credentials are None, set invalid data.
Parameters: |
|
---|
Credentials
(**kwargs)[source]¶Set of credentials for accessing OpenStack services
ATTRIBUTES: list of valid class attributes representing credentials.
KeystoneV2AuthProvider
(credentials, auth_url, disable_ssl_certificate_validation=None, ca_certs=None, trace_requests=None, scope='project', http_timeout=None)[source]¶Provides authentication based on the Identity V2 API
The Keystone Identity V2 API defines both unscoped and project scoped tokens. This auth provider only implements 'project'.
base_url
(filters, auth_data=None)[source]¶Base URL from catalog
Parameters: | filters -- Used to filter results |
---|
Filters can be:
Return type: | string |
---|---|
Returns: | url with filters applied |
KeystoneV3AuthProvider
(credentials, auth_url, disable_ssl_certificate_validation=None, ca_certs=None, trace_requests=None, scope='project', http_timeout=None)[source]¶Provides authentication based on the Identity V3 API
base_url
(filters, auth_data=None)[source]¶Base URL from catalog
If scope is not 'project', it may be that there is not catalog in the auth_data. In such case, as long as the requested service is 'identity', we can use the original auth URL to build the base_url.
Parameters: | filters -- Used to filter results |
---|
Filters can be:
Return type: | string |
---|---|
Returns: | url with filters applied |
KeystoneV3Credentials
(**kwargs)[source]¶Credentials suitable for the Keystone Identity V3 API
is_valid
()[source]¶Check of credentials (no API call)
Valid combinations of v3 credentials (excluding token) - User id, password (optional domain) - User name, password and its domain id/name For the scope, valid combinations are: - None - Project id (optional domain) - Project name and its domain id/name - Domain id - Domain name
get_credentials
(auth_url, fill_in=True, identity_version='v2', disable_ssl_certificate_validation=None, ca_certs=None, trace_requests=None, http_timeout=None, **kwargs)[source]¶Builds a credentials object based on the configured auth_version
Parameters: |
|
---|
Examples:
Returns credentials from the provided parameters: >>> get_credentials(username='foo', password='bar')
Returns credentials including IDs: >>> get_credentials(username='foo', password='bar', fill_in=True)
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.