Table of Contents

Interface IOAuthTokenProvider

Namespace
Glitch9.AIDevKit.Auth

Provides methods to obtain and manage access tokens for authenticated API requests.

public interface IOAuthTokenProvider

Methods

GetTokenAsync(CancellationToken)

Gets a valid access token for the specified scopes.

UniTask<OAuthToken> GetTokenAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Cancellation token to cancel the operation.

Returns

UniTask<OAuthToken>

A valid access token as a string. If the current token is still valid and covers the requested scopes, it should be returned. Otherwise, a new token should be fetched and returned.