keystoneclient.auth.identity package¶
Submodules¶
keystoneclient.auth.identity.base module¶
- class keystoneclient.auth.identity.base.BaseIdentityPlugin(auth_url=None, username=None, password=None, token=None, trust_id=None)¶
Bases: keystoneclient.auth.base.BaseAuthPlugin
- MIN_TOKEN_LIFE_SECONDS = 1¶
- get_access(session, **kwargs)¶
Fetch or return a current AccessInfo object.
If a valid AccessInfo is present then it is returned otherwise a new one will be fetched.
Raises HttpError: An error from an invalid HTTP response. Returns AccessInfo: Valid AccessInfo
- 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.
Raises: - InvalidResponse – The response returned wasn’t appropriate.
- HttpError – An error from an invalid HTTP response.
Returns AccessInfo: Token access information.
- get_endpoint(session, service_type=None, interface=None, region_name=None, **kwargs)¶
Return a valid endpoint for a service.
If a valid token is not present then a new one will be fetched using the session and kwargs.
Parameters: - service_type (string) – The type of service to lookup the endpoint for. This plugin will return None (failure) if service_type is not provided.
- interface (string) – The exposure of the endpoint. Should be public, internal or admin. Defaults to public.
- region_name (string) – The region the endpoint should exist in. (optional)
Raises HttpError: An error from an invalid HTTP response.
Return string or None: A valid endpoint URL or None if not available.
- get_token(session, **kwargs)¶
Return a valid auth token.
If a valid token is not present then a new one will be fetched.
Raises HttpError: An error from an invalid HTTP response. Return string: A valid token.
- invalidate()¶