Main entry point into the Token Persistence service.
keystone.token.persistence.core.
Manager
(*args, **kwargs)[source]¶Bases: object
The token_api provider.
This class is a proxy class to the token_provider_api’s persistence manager.
keystone.token.persistence.core.
PersistenceManager
(*args, **kwargs)[source]¶Bases: keystone.common.manager.Manager
Default pivot point for the Token Persistence backend.
See keystone.common.manager.Manager
for more details on how this
dynamically calls the backend.
delete_tokens_for_domain
(*args, **kwargs)[source]¶Delete all tokens for a given domain.
It will delete all the project-scoped tokens for the projects that are owned by the given domain, as well as any tokens issued to users that are owned by this domain.
However, deletion of domain_scoped tokens will still need to be implemented as stated in TODO below.
delete_tokens_for_user
(*args, **kwargs)[source]¶Delete all tokens for a given user or user-project combination.
This method adds in the extra logic for handling trust-scoped token revocations in a single call instead of needing to explicitly handle trusts in the caller’s logic.
delete_tokens_for_users
(*args, **kwargs)[source]¶Delete all tokens for a list of user_ids.
Parameters: |
|
---|
driver_namespace
= ‘keystone.token.persistence’¶keystone.token.persistence.core.
TokenDriverBase
[source]¶Bases: object
Interface description for a Token driver.
create_token
(token_id, data)[source]¶Create a token by id and data.
Parameters: |
|
---|
{
expires=''
id=token_id,
user=user_ref,
tenant=tenant_ref,
}
Returns: | token_ref or None. |
---|
delete_token
(token_id)[source]¶Delete a token by id.
Parameters: | token_id (string) – identity of the token |
---|---|
Returns: | None. |
Raises: | keystone.exception.TokenNotFound – If the token doesn’t exist. |
delete_tokens
(user_id, tenant_id=None, trust_id=None, consumer_id=None)[source]¶Delete tokens by user.
If the tenant_id is not None, only delete the tokens by user id under the specified tenant.
If the trust_id is not None, it will be used to query tokens and the user_id will be ignored.
If the consumer_id is not None, only delete the tokens by consumer id that match the specified consumer id.
Parameters: |
|
---|---|
Returns: | The tokens that have been deleted. |
Raises: | keystone.exception.TokenNotFound – If the token doesn’t exist. |
get_token
(token_id)[source]¶Get a token by id.
Parameters: | token_id (string) – identity of the token |
---|---|
Returns: | token_ref |
Raises: | keystone.exception.TokenNotFound – If the token doesn’t exist. |
keystone.token.persistence.
Manager
(*args, **kwargs)[source]¶Bases: object
The token_api provider.
This class is a proxy class to the token_provider_api’s persistence manager.
keystone.token.persistence.
TokenDriverBase
[source]¶Bases: object
Interface description for a Token driver.
create_token
(token_id, data)[source]¶Create a token by id and data.
Parameters: |
|
---|
{
expires=''
id=token_id,
user=user_ref,
tenant=tenant_ref,
}
Returns: | token_ref or None. |
---|
delete_token
(token_id)[source]¶Delete a token by id.
Parameters: | token_id (string) – identity of the token |
---|---|
Returns: | None. |
Raises: | keystone.exception.TokenNotFound – If the token doesn’t exist. |
delete_tokens
(user_id, tenant_id=None, trust_id=None, consumer_id=None)[source]¶Delete tokens by user.
If the tenant_id is not None, only delete the tokens by user id under the specified tenant.
If the trust_id is not None, it will be used to query tokens and the user_id will be ignored.
If the consumer_id is not None, only delete the tokens by consumer id that match the specified consumer id.
Parameters: |
|
---|---|
Returns: | The tokens that have been deleted. |
Raises: | keystone.exception.TokenNotFound – If the token doesn’t exist. |
get_token
(token_id)[source]¶Get a token by id.
Parameters: | token_id (string) – identity of the token |
---|---|
Returns: | token_ref |
Raises: | keystone.exception.TokenNotFound – If the token doesn’t exist. |
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.