Skip to content

ICopilotTokenProvider

NexusLabs.Needlr.Copilot

ICopilotTokenProvider Interface

Provides short-lived Copilot API tokens obtained via GitHub OAuth token exchange.

public interface ICopilotTokenProvider

Methods

ICopilotTokenProvider.GetTokenAsync(CancellationToken) Method

Gets a valid Copilot API token, refreshing if expired.

System.Threading.Tasks.Task<string> GetTokenAsync(System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

cancellationToken System.Threading.CancellationToken

Cancellation token.

Returns

System.Threading.Tasks.Task<System.String>
A valid Copilot API bearer token.