SessionSecurityTokenHandler.CreateSessionSecurityToken(ClaimsPrincipal, String, String, DateTime, DateTime) SessionSecurityTokenHandler.CreateSessionSecurityToken(ClaimsPrincipal, String, String, DateTime, DateTime) SessionSecurityTokenHandler.CreateSessionSecurityToken(ClaimsPrincipal, String, String, DateTime, DateTime) SessionSecurityTokenHandler.CreateSessionSecurityToken(ClaimsPrincipal, String, String, DateTime, DateTime) 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

context
String String String String

A caller-defined context string.

endpointId
String String String String

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

validFrom
DateTime DateTime DateTime DateTime

The time instant at which the token becomes valid.

validTo
DateTime DateTime DateTime 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

Applies to