API Reference
CopilotNativeAuthentication
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
- httpClient System.Net.Http.HttpClient = null
Methods
public virtual Void Dispose() #VoidReleases HTTP resources created by this instance. Call after outstanding operations finish.
public async Task<String> GetAccessTokenAsync(CancellationToken cancellationToken = null) #Task<String>Returns the current credential, renewing a stored expiring token when configured. Never invokes a CLI.
Parameters
- cancellationToken System.Threading.CancellationToken = null
public async Task<AccountInfo> GetAccountAsync(CancellationToken cancellationToken = null) #Task<AccountInfo>Verifies the identity associated with the selected credential.
Parameters
- cancellationToken System.Threading.CancellationToken = null
public async Task<AccountInfo> LoginAsync(Action<GitHubDeviceAuthorization> onCode, CancellationToken cancellationToken = null) #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}
- cancellationToken System.Threading.CancellationToken = null
public async Task LogoutAsync(CancellationToken cancellationToken = null) #TaskRemoves this account's stored credential and prevents reuse in this instance. Does not revoke GitHub grants.
Parameters
- cancellationToken System.Threading.CancellationToken = null
Inherited Methods
Fields
public const String Provider #Provider key used in the shared IntelligenceX authentication store.
copilot