ovok_sdk.auth.token_endpoint

The OAuth token endpoint.

  • Stable unknown
  • Release candidate since 0.1.0-rc.4
  • Development since 0.1.0-dev.25+2ba84b0

The OAuth token endpoint.

TokenResponse

TokenResponse(access_token: str, expires_in: float, refresh_token: str | None = None)

A successful token endpoint response.

Attributes

NameTypeDescription
access_tokenstrThe new bearer token; never shown in repr.
expires_infloatLifetime of the access token in seconds.
refresh_tokenstr | NoneA new refresh token, when the endpoint issues one.

from_json()

from_json(body: Mapping[str, Any]) -> TokenResponse

Read the snake_case OAuth response body.

TokenEndpoint

TokenEndpoint(settings: OvokSettings)

Ovok's OAuth token endpoint: one plain form POST, without retries or credentials.

Parameters

NameTypeDefaultDescription
settingsOvokSettingsThe client's settings.

request()

request(form: Mapping[str, str]) -> TokenResponse

Post form to the token endpoint.

Parameters

NameTypeDefaultDescription
formMapping[str, str]OAuth form fields, such as grant_type.

Returns

  • TokenResponse: The issued tokens.

Raises

  • OvokError: The endpoint answered with an error.

Last updated on

On this page