Table of Contents

Class TokenInfo

Namespace
Arc4u.OAuth2.Token
Assembly
Arc4u.OAuth2.dll

A token with its type and expiration date.

public class TokenInfo
Inheritance
TokenInfo
Inherited Members

Constructors

TokenInfo(string, string)

Initializes a new instance of the TokenInfo class from a JWT; the expiration date is the ValidTo of the token.

public TokenInfo(string tokenType, string token)

Parameters

tokenType string

The token type, for example Bearer.

token string

The JWT.

TokenInfo(string, string, DateTime)

Initializes a new instance of the TokenInfo class with an explicit expiration date.

[JsonConstructor]
public TokenInfo(string tokenType, string token, DateTime expiresOnUtc)

Parameters

tokenType string

The token type, for example Bearer.

token string

The token value.

expiresOnUtc DateTime

The expiration date. It is converted to UTC.

Properties

ExpiresOnUtc

Gets the point in time in which the Access Token returned in the AccessToken property ceases to be valid. This value is calculated based on current UTC time measured locally and the value expiresIn received from the service.

public DateTime ExpiresOnUtc { get; }

Property Value

DateTime

Token

Gets the Access Token requested.

public string Token { get; }

Property Value

string

TokenType

Gets the type of the Access Token returned.

public string TokenType { get; }

Property Value

string