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) -> int

Return 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

NameTypeDescription
valuestrThe token; never shown in repr.
expires_at_msintExpiry in epoch milliseconds.

is_stale_at()

is_stale_at(now_ms: int) -> bool

Stale a minute early, so a token never expires between the check and the request.

Last updated on

On this page