Table Of Contents

Previous topic

backends Package

Next topic

backends Package

This Page

token Package

token Package

core Module

Main entry point into the Token service.

class keystone.token.core.Driver

Bases: object

Interface description for a Token driver.

create_token(token_id, data)

Create a token by id and data.

Parameters:
  • token_id (string) – identity of the token
  • data – dictionary with additional reference information
{
    expires=''
    id=token_id,
    user=user_ref,
    tenant=tenant_ref,
    metadata=metadata_ref
}
Returns:token_ref or None.
delete_token(token_id)

Deletes a token by id.

Parameters:token_id (string) – identity of the token
Returns:None.
Raises :keystone.exception.TokenNotFound
get_token(token_id)

Get a token by id.

Parameters:token_id (string) – identity of the token
Returns:token_ref
Raises :keystone.exception.TokenNotFound
list_tokens(user_id)

Returns a list of current token_id’s for a user

Parameters:user_id (string) – identity of the user
Returns:list of token_id’s
class keystone.token.core.Manager

Bases: keystone.common.manager.Manager

Default pivot point for the Token backend.

See keystone.common.manager.Manager for more details on how this dynamically calls the backend.