ApiToken
Cached bearer token.
Cached bearer token.
Attributes
attributeaccess_tokenstrattributeexpires_atdatetime | None= Noneattributeleeway_secondsint= 0attributeexpiredboolReport whether the token is expired or about to be.
Functions
funcfrom_response(response) -> SelfBuild a cached token from a login response.
paramresponseTokenResponseToken response returned by the server.
Returns
typing.SelfToken with its absolute expiry and leeway resolved.
funcissued(access_token, expires_in) -> SelfBuild a cached token from a bearer token and its lifetime.
paramaccess_tokenstrBearer token.
paramexpires_inintToken lifetime in seconds.
Returns
typing.SelfToken with its absolute expiry and leeway resolved.