roboto.domain.tokens.token
Module Contents
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()
classmethod create(name, description=None, expiry_days=30, api_scopes=None, roboto_client=None)#View Source
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
tuple[Token, str]
Token.delete()
Return type
None
Token.disable()
Token.enable()
Token.for_self()
Parameters
roboto_client Optional[roboto.Return type
collections. abc. Collection[Token]
Token.from_id()
Parameters
token_id strroboto_client Optional[roboto.Return type
Properties
Token.record
Return type: roboto. domain. tokens. record. TokenRecord
Token.to_dict()
Return type
dict[str, Any]