SessionSecurityToken Constructor (ClaimsPrincipal)

.NET Framework (current version)
 

Initializes a new instance of the SessionSecurityToken class from the specified principal.

Namespace:   System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public SessionSecurityToken(
	ClaimsPrincipal claimsPrincipal
)

Parameters

claimsPrincipal
Type: System.Security.Claims.ClaimsPrincipal

The claims principal from which to initialize the token.

Exception Condition
ArgumentNullException

claimsPrincipal is null.

-or-

The Identities property of claimsPrincipal is null.

The following table shows initial property values for an instance of the SessionSecurityToken class.

Property

Initial Value

ClaimsPrincipal

claimsPrincipal

Context

null

ContextId

Set to a generated unique ID.

EndpointId

String.Empty

Id

Set to a generated unique ID.

IsPersistent

false

IsReferenceMode

false

KeyEffectiveTime

UtcNow

KeyExpirationTime

UtcNow plus the SessionSecurityTokenHandler.DefaultTokenLifetime property.

KeyGeneration

null

SecurityKeys

Contains a generated 128 bit symmetric key.

System_CAPS_noteNote

The default implementation does not use this property. Signing and encryption keys are dictated by the cookie transforms applied by the SessionSecurityTokenHandler that processes the token.

ValidFrom

UtcNow

ValidTo

UtcNow plus the SessionSecurityTokenHandler.DefaultTokenLifetime property.

.NET Framework
Available since 4.5
Return to top
Show: