Table of Contents

Class OidcTokens

Namespace
OpenShell.Oidc
Assembly
OpenShell.Sdk.dll

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

AccessToken string

The access token.

RefreshToken string

The refresh token, when the provider issued one.

TokenType string

The token type, usually Bearer.

ExpiresAt DateTimeOffset?

When the access token expires; null when the provider did not say.

Properties

AccessToken

The access token.

public string AccessToken { get; init; }

Property Value

string

ExpiresAt

When the access token expires; null when the provider did not say.

public DateTimeOffset? ExpiresAt { get; init; }

Property Value

DateTimeOffset?

RefreshToken

The refresh token, when the provider issued one.

public string? RefreshToken { get; init; }

Property Value

string

TokenType

The token type, usually Bearer.

public string? TokenType { get; init; }

Property Value

string

Methods

ToAccessToken()

Converts to the SDK's AccessToken (dropping the refresh token).

public AccessToken ToAccessToken()

Returns

AccessToken

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.