Edit

Share via


SessionSecurityTokenHandler.CreateToken(SecurityTokenDescriptor) Method

Definition

Creates a security token based on the specified token descriptor.

public override System.IdentityModel.Tokens.SecurityToken CreateToken(System.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor);

Parameters

tokenDescriptor
SecurityTokenDescriptor

The token descriptor from which to create the token.

Returns

The security token that was created. This will be an instance of SessionSecurityToken.

Exceptions

tokenDescriptor is null.

Remarks

Creates and returns a session security token by using the following properties in the token descriptor: SecurityTokenDescriptor.Subject, and SecurityTokenDescriptor.Lifetime. If the SecurityTokenHandlerConfiguration.SaveBootstrapContext property is set true on the token handler configuration specified by the Configuration property, the bootstrap context is created from the SecurityTokenDescriptor.Token property and is saved in the session token.

Applies to

Product Versions
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1