Class OidcLogin
Entry points for the OIDC flows: interactive login, device login, refresh and client credentials.
public static class OidcLogin
- Inheritance
-
OidcLogin
- Inherited Members
Methods
ClientCredentialsAsync(OidcOptions, CancellationToken)
One-shot client-credentials exchange. A missing expires_in is tolerated here (the token has no expiry);
use ClientCredentialsAuth for a renewable provider.
public static Task<OidcTokens> ClientCredentialsAsync(OidcOptions options, CancellationToken cancellationToken = default)
Parameters
optionsOidcOptionscancellationTokenCancellationToken
Returns
DeviceLoginAsync(OidcOptions, CancellationToken)
RFC 8628 device-code login.
public static Task<OidcTokens> DeviceLoginAsync(OidcOptions options, CancellationToken cancellationToken = default)
Parameters
optionsOidcOptionscancellationTokenCancellationToken
Returns
LoginAsync(OidcOptions, CancellationToken)
Authorization-code login with PKCE (when advertised). Opens a browser and listens on a loopback port, falling back to the paste-the-code flow. A valid cached token issued for the same issuer and client id is returned without any prompt.
public static Task<OidcTokens> LoginAsync(OidcOptions options, CancellationToken cancellationToken = default)
Parameters
optionsOidcOptionscancellationTokenCancellationToken
Returns
RefreshAsync(OidcOptions, string, CancellationToken)
Exchanges a refresh token for new tokens. The response may omit a new refresh token; keep the old one then.
public static Task<OidcTokens> RefreshAsync(OidcOptions options, string refreshToken, CancellationToken cancellationToken = default)
Parameters
optionsOidcOptionsrefreshTokenstringcancellationTokenCancellationToken