SecurityContextSecurityToken.CreateCookieSecurityContextToken Method (UniqueId, String, Byte[], DateTime, DateTime, ReadOnlyCollection<IAuthorizationPolicy>, SecurityStateEncoder)

 

Creates a security context token cookie.

Namespace:   System.ServiceModel.Security.Tokens
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public static SecurityContextSecurityToken CreateCookieSecurityContextToken(
	UniqueId contextId,
	string id,
	byte[] key,
	DateTime validFrom,
	DateTime validTo,
	ReadOnlyCollection<IAuthorizationPolicy> authorizationPolicies,
	SecurityStateEncoder securityStateEncoder
)

Parameters

contextId
Type: System.Xml.UniqueId

A UniqueId that represents the context id.

id
Type: System.String

The token id.

key
Type: System.Byte[]

A byte array that represents the key.

validFrom
Type: System.DateTime

The effective start time.

validTo
Type: System.DateTime

The expiration time.

authorizationPolicies
Type: System.Collections.ObjectModel.ReadOnlyCollection<IAuthorizationPolicy>

A read-only collection of IAuthorizationPolicy instances.

securityStateEncoder
Type: System.ServiceModel.Security.SecurityStateEncoder

The security state encoder.

Return Value

Type: System.ServiceModel.Security.Tokens.SecurityContextSecurityToken

A security context token cookie.

.NET Framework
Available since 3.0
Return to top
Show: