Class TokenInfo
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
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
tokenTypestringThe token type, for example
Bearer.tokenstringThe token value.
expiresOnUtcDateTimeThe 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
Token
Gets the Access Token requested.
public string Token { get; }
Property Value
TokenType
Gets the type of the Access Token returned.
public string TokenType { get; }