roboto.domain.tokens
Submodules
Package Contents
CreateTokenRequest
Bases: pydantic.BaseModel
Request payload to create a new token
Parameters
data AnyAttributes
CreateTokenRequest.api_scopes
CreateTokenRequest.description
CreateTokenRequest.expiry_days
CreateTokenRequest.name
Token
A token allows users and devices to authenticate requests to Roboto.
When a token is generated, a secret value is created which is shared with the user exactly once. This value is required for authentication, if lost a token can be deleted and a new token can be generated.
Parameters
roboto_client Optional[roboto.Token.create()
This returns a tuple of the token and the one-time generated secret. After creation, you’ll never be able to retrieve the secret again, so you should save it!
Parameters
name strdescription Optional[str]expiry_days intapi_scopes Optional[set[roboto.roboto_client Optional[roboto.Return type
Token.delete()
Return type
Token.disable()
Token.enable()
Token.for_self()
Parameters
roboto_client Optional[roboto.Return type
Token.from_id()
Parameters
token_id strroboto_client Optional[roboto.Return type
Properties
Token.record
Token.to_dict()
Return type
TokenContext
Bases: pydantic.BaseModel
Context for token usage
Parameters
data AnyAttributes
TokenContext.api_scopes
TokenContext.description
TokenContext.enabled
TokenContext.expires
TokenContext.last_used
TokenContext.name
TokenContext.token_id
TokenRecord
Bases: pydantic.BaseModel
A wire-transmissible representation of a token.
Parameters
data AnyAttributes