Redigeeri

Jagamisviis:


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);
public override System.IdentityModel.Tokens.SecurityToken CreateToken (System.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor);
override this.CreateToken : System.IdentityModel.Tokens.SecurityTokenDescriptor -> System.IdentityModel.Tokens.SecurityToken
Public Overrides Function CreateToken (tokenDescriptor As SecurityTokenDescriptor) As SecurityToken

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