SessionSecurityTokenHandler.CreateSessionSecurityToken(ClaimsPrincipal, String, String, DateTime, DateTime) Method

Definition

Crée un SessionSecurityToken en fonction du principal des revendications spécifié et de la plage horaire pendant laquelle le jeton est valide.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

Principal de la revendication.The claims principal.

context
String

Chaîne de contexte définie par l'appelant.A caller-defined context string.

endpointId
String

Identificateur du point de terminaison auquel le jeton est étendu.The identifier of the endpoint to which the token is scoped.

validFrom
DateTime

Instant auquel le jeton devient non valide.The time instant at which the token becomes valid.

validTo
DateTime

Instant après lequel le jeton n'est plus valide.The time instant after which the token is no longer valid.

Returns

SessionSecurityToken

Jeton de sécurité de session qui a été créé.The session security token that was created. Les propriétés du nouveau jeton de session sont définies en fonction des paramètres spécifiés.The properties on the new session token are set according to the specified parameters.

Exceptions

principal a la valeur null.principal is null.

La propriété Configuration a la valeur null.The Configuration property is null.

Applies to