Redigera

Dela via


SecurityTokenDescriptor.AddAuthenticationClaims Method

Definition

Adds the specified authentication claims to the subject of the current instance.

Overloads

AddAuthenticationClaims(String)

Adds a claim for the specified authentication method to the subject of the current instance. The authentication instant is set to the current time.

AddAuthenticationClaims(String, DateTime)

Adds claims for the specified authentication type and authentication instant to the subject of the current instance.

AddAuthenticationClaims(String)

Adds a claim for the specified authentication method to the subject of the current instance. The authentication instant is set to the current time.

public:
 void AddAuthenticationClaims(System::String ^ authType);
public void AddAuthenticationClaims (string authType);
member this.AddAuthenticationClaims : string -> unit
Public Sub AddAuthenticationClaims (authType As String)

Parameters

authType
String

A URI that specifies the authentication method.

Remarks

A Claim with a claim type of AuthenticationMethod and a value of authType and a Claim with a claim type of AuthenticationInstant and a value of UtcNow are added to the ClaimsIdentity specified by the Subject property.

Applies to

AddAuthenticationClaims(String, DateTime)

Adds claims for the specified authentication type and authentication instant to the subject of the current instance.

public:
 void AddAuthenticationClaims(System::String ^ authType, DateTime time);
public void AddAuthenticationClaims (string authType, DateTime time);
member this.AddAuthenticationClaims : string * DateTime -> unit
Public Sub AddAuthenticationClaims (authType As String, time As DateTime)

Parameters

authType
String

A URI that specifies the authentication method.

time
DateTime

The authentication instant in UTC. If the time is not in UTC, it is converted to UTC.

Remarks

A Claim with a claim type of AuthenticationMethod and a value of authType and a Claim with a claim type of AuthenticationInstant and a value of time are added to the ClaimsIdentity specified by the Subject property.

Applies to