Class OidcTokens
Tokens returned by an OIDC flow.
public sealed record OidcTokens : IEquatable<OidcTokens>
- Inheritance
-
OidcTokens
- Implements
- Inherited Members
Constructors
OidcTokens(string, string?, string?, DateTimeOffset?)
Tokens returned by an OIDC flow.
public OidcTokens(string AccessToken, string? RefreshToken = null, string? TokenType = null, DateTimeOffset? ExpiresAt = null)
Parameters
AccessTokenstringThe access token.
RefreshTokenstringThe refresh token, when the provider issued one.
TokenTypestringThe token type, usually
Bearer.ExpiresAtDateTimeOffset?When the access token expires; null when the provider did not say.
Properties
AccessToken
The access token.
public string AccessToken { get; init; }
Property Value
ExpiresAt
When the access token expires; null when the provider did not say.
public DateTimeOffset? ExpiresAt { get; init; }
Property Value
RefreshToken
The refresh token, when the provider issued one.
public string? RefreshToken { get; init; }
Property Value
TokenType
The token type, usually Bearer.
public string? TokenType { get; init; }
Property Value
Methods
ToAccessToken()
Converts to the SDK's AccessToken (dropping the refresh token).
public AccessToken ToAccessToken()
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.