IntelligenceX

API Reference

Class

CopilotNativeAuthentication

Namespace IntelligenceX.Copilot.Native
Assembly IntelligenceX
Implements
IDisposable
Modifiers sealed

Owns Copilot credentials, optional GitHub device sign-in, and renewal independently of any product or CLI.

Inheritance

  • Object
  • CopilotNativeAuthentication

Constructors

public CopilotNativeAuthentication(CopilotNativeOptions options, HttpClient httpClient = null) #

Creates a credential owner. A supplied HTTP client takes precedence over the options handler and remains owned by the caller.

Parameters

options IntelligenceX.Copilot.Native.CopilotNativeOptions requiredposition: 0
httpClient System.Net.Http.HttpClient = null optionalposition: 1

Methods

public virtual Void Dispose() #
Returns: Void

Releases HTTP resources created by this instance. Call after outstanding operations finish.

public async Task<String> GetAccessTokenAsync(CancellationToken cancellationToken = null) #
Returns: Task<String>

Returns the current credential, renewing a stored expiring token when configured. Never invokes a CLI.

Parameters

cancellationToken System.Threading.CancellationToken = null optionalposition: 0
public async Task<AccountInfo> GetAccountAsync(CancellationToken cancellationToken = null) #
Returns: Task<AccountInfo>

Verifies the identity associated with the selected credential.

Parameters

cancellationToken System.Threading.CancellationToken = null optionalposition: 0
public async Task<AccountInfo> LoginAsync(Action<GitHubDeviceAuthorization> onCode, CancellationToken cancellationToken = null) #
Returns: Task<AccountInfo>

Runs device sign-in, verifies GitHub identity, and saves the credential only when an auth store was explicitly supplied.

Parameters

onCode System.Action{IntelligenceX.Authentication.GitHub.GitHubDeviceAuthorization} requiredposition: 0
cancellationToken System.Threading.CancellationToken = null optionalposition: 1
public async Task LogoutAsync(CancellationToken cancellationToken = null) #
Returns: Task

Removes this account's stored credential and prevents reuse in this instance. Does not revoke GitHub grants.

Parameters

cancellationToken System.Threading.CancellationToken = null optionalposition: 0

Fields

public const String Provider #

Provider key used in the shared IntelligenceX authentication store.

Value: copilot