Class TokenResponse
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
accessTokenstringAccess token from OIDC token response.
idTokenstringID token from OIDC token response.
scopestringScopes requested in OICD authorization request.
refreshTokenstringRefresh token from OIDC token response.
accessTokenExpirationDateTimeOffset?Expiry of OIDC access token.
Properties
AccessToken
Gets the access token issued by the authorization server.
public string AccessToken { get; }
Property Value
AccessTokenExpiration
Gets the time the access token expires.
public DateTimeOffset? AccessTokenExpiration { get; }
Property Value
CanRefresh
Gets whether or not the access token can be refreshed.
[JsonIgnore]
public bool CanRefresh { get; }
Property Value
IdToken
Gets OpenID Connect ID token issued by the authorization server.
public string IdToken { get; }
Property Value
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
Scope
Gets the scope of the access token.
public string? Scope { get; }
Property Value
User
Gets the user information returned by the OIDC provider.
public UserInformation? User { get; }