The keystoneclient.access Module

class keystoneclient.access.AccessInfo(*args, **kwargs)

Bases: dict

An object for encapsulating a raw authentication token from keystone and helper methods for extracting useful values from that token.

auth_token

Returns the token_id associated with the auth request, to be used in headers for authenticating OpenStack API requests.

Returns:str
auth_url

Returns a tuple of URLs from publicURL and adminURL for the service ‘identity’ from the service catalog associated with the authorization request. If the authentication request wasn’t scoped to a tenant (project), this property will return None.

Returns:tuple of urls
expires

Returns the token expiration (as datetime object)

Returns:datetime
management_url

Returns the first adminURL for ‘identity’ from the service catalog associated with the authorization request, or None if the authentication request wasn’t scoped to a tenant (project).

Returns:tuple of urls
project_id

Synonym for project_id

project_name

Synonym for tenant_name

scoped

Returns true if the authorization token was scoped to a tenant (project), and contains a populated service catalog.

Returns:bool
tenant_id

Returns the tenant (project) id associated with the authentication request, or None if the authentication request wasn’t scoped to a tenant (project).

Returns:str
tenant_name

Returns the tenant (project) name associated with the authentication request.

Returns:str
user_id

Returns the user id associated with the authentication request.

Returns:str
username

Returns the username associated with the authentication request. Follows the pattern defined in the V2 API of first looking for ‘name’, returning that if available, and falling back to ‘username’ if name is unavailable.

Returns:str
will_expire_soon(stale_duration=None)

Determines if expiration is about to occur.

Returns:boolean : true if expiration is within the given duration

Previous topic

<no title>

Next topic

The keystoneclient.base Module

This Page