ערוך

שתף באמצעות


SessionSecurityTokenHandler.CreateSessionSecurityToken Method

Definition

Creates a SessionSecurityToken based on the specified claims principal and time range during which the token is valid.

public:
 virtual System::IdentityModel::Tokens::SessionSecurityToken ^ CreateSessionSecurityToken(System::Security::Claims::ClaimsPrincipal ^ principal, System::String ^ context, System::String ^ endpointId, DateTime validFrom, DateTime validTo);
public virtual System.IdentityModel.Tokens.SessionSecurityToken CreateSessionSecurityToken (System.Security.Claims.ClaimsPrincipal principal, string context, string endpointId, DateTime validFrom, DateTime validTo);
abstract member CreateSessionSecurityToken : System.Security.Claims.ClaimsPrincipal * string * string * DateTime * DateTime -> System.IdentityModel.Tokens.SessionSecurityToken
override this.CreateSessionSecurityToken : System.Security.Claims.ClaimsPrincipal * string * string * DateTime * DateTime -> System.IdentityModel.Tokens.SessionSecurityToken
Public Overridable Function CreateSessionSecurityToken (principal As ClaimsPrincipal, context As String, endpointId As String, validFrom As DateTime, validTo As DateTime) As SessionSecurityToken

Parameters

principal
ClaimsPrincipal

The claims principal.

context
String

A caller-defined context string.

endpointId
String

The identifier of the endpoint to which the token is scoped.

validFrom
DateTime

The time instant at which the token becomes valid.

validTo
DateTime

The time instant after which the token is no longer valid.

Returns

The session security token that was created. The properties on the new session token are set according to the specified parameters.

Exceptions

principal is null.

Applies to