Share via


AuthenticationToken Constructor

Definition

Initializes a new instance of the AuthenticationToken class.

public AuthenticationToken(string tokenValue, string tokenType, DateTimeOffset expiresOn, DateTimeOffset? refreshOn = default);
new System.ClientModel.Primitives.AuthenticationToken : string * string * DateTimeOffset * Nullable<DateTimeOffset> -> System.ClientModel.Primitives.AuthenticationToken
Public Sub New (tokenValue As String, tokenType As String, expiresOn As DateTimeOffset, Optional refreshOn As Nullable(Of DateTimeOffset) = Nothing)

Parameters

tokenValue
String

The access token value.

tokenType
String

The type of the access token (e.g., "Bearer").

expiresOn
DateTimeOffset

The date and time when the token expires.

refreshOn
Nullable<DateTimeOffset>

Optional. The date and time when the token should be refreshed. Default is null.

Exceptions

Thrown when tokenValue is null or empty.

Applies to