Class GraphQlAuthorizationCodeOptions
Options for creating a BpQlApplication that authenticates via the
OAuth 2.0 authorization code flow with PKCE. At least one credential source must be set:
an InitialTokens set from a completed login, a stored RefreshToken,
microtech ERP user credentials (Username/Password plus
RedirectUri), or a combination — the freshest source is used first and the
credentials serve as self-healing fallback.
Tokens are acquired lazily on first use; use the static BpQlApplication.*Async factories
to authenticate eagerly (fail fast) or to log in interactively via the browser.
public sealed class GraphQlAuthorizationCodeOptions
- Inheritance
-
objectGraphQlAuthorizationCodeOptions
Properties
ClientId
The OAuth client ID.
public required string ClientId { get; init; }
Property Value
ClientSecret
The client secret for confidential clients, or null for public clients.
public string? ClientSecret { get; init; }
Property Value
InitialTokens
A token set from a completed login (e.g. CompleteAsync(string, CancellationToken) in a consumer-hosted callback). Used directly; refreshed via its refresh token when it expires.
public GraphQlTokenSet? InitialTokens { get; init; }
Property Value
OnTokensUpdated
Callback raised after every token acquisition; persist RefreshToken here (refresh tokens rotate).
public Action<GraphQlTokenSet>? OnTokensUpdated { get; init; }
Property Value
Password
The microtech ERP password for the direct (Basic auth) login at the authorize endpoint.
public string? Password { get; init; }
Property Value
RedirectUri
public string? RedirectUri { get; init; }
Property Value
RefreshToken
A stored refresh token to resume a previous session.
public string? RefreshToken { get; init; }
Property Value
Username
The microtech ERP username for the direct (Basic auth) login at the authorize endpoint.
public string? Username { get; init; }