API referenceauth
ovok_sdk.auth.client_credentials
Machine-client authentication with the OAuth client-credentials grant.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.25+2ba84b0
Machine-client authentication with the OAuth client-credentials grant.
ClientCredentials
ClientCredentials(
endpoint: TokenEndpoint,
client: MachineClient,
clock: Clock = epoch_ms,
)A machine client's own token, fetched from the OAuth endpoint and renewed before it expires.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
endpoint | TokenEndpoint | The OAuth token endpoint. | |
client | MachineClient | The machine client's credentials. | |
clock | Clock | epoch_ms | Current time in epoch milliseconds. |
access_token()
access_token() -> strReturn a fresh access token, requesting a new one when the current one is stale.
refresh()
refresh() -> boolRequest a new token.
Returns
bool: Always True; a failed request raises instead.
Last updated on