Class ClientCredentialsTokenResponse

Namespace
Cratis.Arc.Connections
Assembly
Cratis.Arc.Core.dll

Represents the parts of an OAuth 2.0 token response ClientCredentialsAccessTokenProvider reads.

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

Constructors

ClientCredentialsTokenResponse(ClientCredentialsTokenResponse)

protected ClientCredentialsTokenResponse(ClientCredentialsTokenResponse original)

Parameters

original ClientCredentialsTokenResponse

ClientCredentialsTokenResponse(string?, long?)

Represents the parts of an OAuth 2.0 token response ClientCredentialsAccessTokenProvider reads.

public ClientCredentialsTokenResponse(string? AccessToken, long? ExpiresIn)

Parameters

AccessToken string

The issued access token.

ExpiresIn long?

The lifetime of the token in seconds, if given.

Properties

AccessToken

The issued access token.

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

Property Value

string

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

ExpiresIn

The lifetime of the token in seconds, if given.

[JsonPropertyName("expires_in")]
[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)]
public long? ExpiresIn { get; init; }

Property Value

long?

Methods

Deconstruct(out string?, out long?)

public void Deconstruct(out string? AccessToken, out long? ExpiresIn)

Parameters

AccessToken string
ExpiresIn long?

Equals(ClientCredentialsTokenResponse?)

public virtual bool Equals(ClientCredentialsTokenResponse? other)

Parameters

other ClientCredentialsTokenResponse

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(ClientCredentialsTokenResponse?, ClientCredentialsTokenResponse?)

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

Parameters

left ClientCredentialsTokenResponse
right ClientCredentialsTokenResponse

Returns

bool

operator !=(ClientCredentialsTokenResponse?, ClientCredentialsTokenResponse?)

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

Parameters

left ClientCredentialsTokenResponse
right ClientCredentialsTokenResponse

Returns

bool