Table of Contents

Class OAuthTokenResponse

Namespace
XENBIT.ResQueServe.Core.Models
Assembly
RQS.Core.dll

RFC 6749-compliant token response of the token endpoint (authorization_code, refresh_token and client_credentials grants).

public sealed record OAuthTokenResponse : IEquatable<OAuthTokenResponse>
Inheritance
OAuthTokenResponse
Implements
Inherited Members
Extension Methods

Constructors

OAuthTokenResponse()

public OAuthTokenResponse()

Properties

AccessToken

[JsonPropertyName("access_token")]
public required string AccessToken { get; init; }

Property Value

string

ExpiresIn

[JsonPropertyName("expires_in")]
public required int ExpiresIn { get; init; }

Property Value

int

RefreshToken

Gets a new access token (and a new refresh token) at the token endpoint with grant_type=refresh_token; each refresh token is valid once. Only for the authorization_code and refresh_token grants.

[JsonPropertyName("refresh_token")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? RefreshToken { get; init; }

Property Value

string

TokenType

[JsonPropertyName("token_type")]
public string TokenType { get; init; }

Property Value

string

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(OAuthTokenResponse?)

public bool Equals(OAuthTokenResponse? other)

Parameters

other OAuthTokenResponse

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(OAuthTokenResponse?, OAuthTokenResponse?)

public static bool operator ==(OAuthTokenResponse? left, OAuthTokenResponse? right)

Parameters

left OAuthTokenResponse
right OAuthTokenResponse

Returns

bool

operator !=(OAuthTokenResponse?, OAuthTokenResponse?)

public static bool operator !=(OAuthTokenResponse? left, OAuthTokenResponse? right)

Parameters

left OAuthTokenResponse
right OAuthTokenResponse

Returns

bool