Table of Contents

Class TokenResponse

Namespace
Tenduke.Core.Auth
Assembly
Tenduke.Core.dll

Access, refresh, and identity token information from authentication with Idp.

public class TokenResponse
Inheritance
TokenResponse
Inherited Members

Constructors

TokenResponse(string, string, string?, string?, DateTimeOffset?)

Initialize a new instance.

public TokenResponse(string accessToken, string idToken, string? scope, string? refreshToken, DateTimeOffset? accessTokenExpiration)

Parameters

accessToken string

Access token from OIDC token response.

idToken string

ID token from OIDC token response.

scope string

Scopes requested in OICD authorization request.

refreshToken string

Refresh token from OIDC token response.

accessTokenExpiration DateTimeOffset?

Expiry of OIDC access token.

Properties

AccessToken

Gets the access token issued by the authorization server.

public string AccessToken { get; }

Property Value

string

AccessTokenExpiration

Gets the time the access token expires.

public DateTimeOffset? AccessTokenExpiration { get; }

Property Value

DateTimeOffset?

CanRefresh

Gets whether or not the access token can be refreshed.

[JsonIgnore]
public bool CanRefresh { get; }

Property Value

bool

IdToken

Gets OpenID Connect ID token issued by the authorization server.

public string IdToken { get; }

Property Value

string

RefreshToken

Gets the refresh token, which can be used to obtain new access tokens using the same authorization grant

public string? RefreshToken { get; }

Property Value

string

Scope

Gets the scope of the access token.

public string? Scope { get; }

Property Value

string

User

Gets the user information returned by the OIDC provider.

public UserInformation? User { get; }

Property Value

UserInformation