API referenceauth
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
| Name | Type | Description |
|---|---|---|
access_token | str | The new bearer token; never shown in repr. |
expires_in | float | Lifetime of the access token in seconds. |
refresh_token | str | None | A new refresh token, when the endpoint issues one. |
from_json()
from_json(body: Mapping[str, Any]) -> TokenResponseRead the snake_case OAuth response body.
TokenEndpoint
TokenEndpoint(settings: OvokSettings)Ovok's OAuth token endpoint: one plain form POST, without retries or credentials.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
settings | OvokSettings | The client's settings. |
request()
request(form: Mapping[str, str]) -> TokenResponsePost form to the token endpoint.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
form | Mapping[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