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