API referenceauth
ovok_sdk.auth.access_token
OAuth access tokens and their expiry.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.25+2ba84b0
OAuth access tokens and their expiry.
expires_at_for()
expires_at_for(expires_in_seconds: float, now_ms: int) -> intReturn the epoch-millisecond expiry of a token that lives expires_in_seconds from now_ms.
AccessToken
AccessToken(value: str, expires_at_ms: int)A bearer token and when it expires.
Attributes
| Name | Type | Description |
|---|---|---|
value | str | The token; never shown in repr. |
expires_at_ms | int | Expiry in epoch milliseconds. |
is_stale_at()
is_stale_at(now_ms: int) -> boolStale a minute early, so a token never expires between the check and the request.
Last updated on