SecurityContextSecurityToken.CreateCookieSecurityContextToken 方法

定义

创建安全上下文令牌 Cookie。

重载

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

创建安全上下文令牌 Cookie。

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

创建安全上下文令牌 Cookie。

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

创建安全上下文令牌 Cookie。

public:
 static System::ServiceModel::Security::Tokens::SecurityContextSecurityToken ^ CreateCookieSecurityContextToken(System::Xml::UniqueId ^ contextId, System::String ^ id, cli::array <System::Byte> ^ key, DateTime validFrom, DateTime validTo, System::Collections::ObjectModel::ReadOnlyCollection<System::IdentityModel::Policy::IAuthorizationPolicy ^> ^ authorizationPolicies, System::ServiceModel::Security::SecurityStateEncoder ^ securityStateEncoder);
public static System.ServiceModel.Security.Tokens.SecurityContextSecurityToken CreateCookieSecurityContextToken (System.Xml.UniqueId contextId, string id, byte[] key, DateTime validFrom, DateTime validTo, System.Collections.ObjectModel.ReadOnlyCollection<System.IdentityModel.Policy.IAuthorizationPolicy> authorizationPolicies, System.ServiceModel.Security.SecurityStateEncoder securityStateEncoder);
static member CreateCookieSecurityContextToken : System.Xml.UniqueId * string * byte[] * DateTime * DateTime * System.Collections.ObjectModel.ReadOnlyCollection<System.IdentityModel.Policy.IAuthorizationPolicy> * System.ServiceModel.Security.SecurityStateEncoder -> System.ServiceModel.Security.Tokens.SecurityContextSecurityToken
Public Shared Function CreateCookieSecurityContextToken (contextId As UniqueId, id As String, key As Byte(), validFrom As DateTime, validTo As DateTime, authorizationPolicies As ReadOnlyCollection(Of IAuthorizationPolicy), securityStateEncoder As SecurityStateEncoder) As SecurityContextSecurityToken

参数

contextId
UniqueId

一个表示上下文 ID 的 UniqueId

id
String

令牌 ID。

key
Byte[]

一个表示密钥的字节数组。

validFrom
DateTime

有效的起始时间。

validTo
DateTime

过期时间。

authorizationPolicies
ReadOnlyCollection<IAuthorizationPolicy>

IAuthorizationPolicy 实例的一个只读集合。

securityStateEncoder
SecurityStateEncoder

安全状态编码器。

返回

SecurityContextSecurityToken

一个安全上下文令牌 Cookie。

适用于

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

创建安全上下文令牌 Cookie。

public:
 static System::ServiceModel::Security::Tokens::SecurityContextSecurityToken ^ CreateCookieSecurityContextToken(System::Xml::UniqueId ^ contextId, System::String ^ id, cli::array <System::Byte> ^ key, DateTime validFrom, DateTime validTo, System::Xml::UniqueId ^ keyGeneration, DateTime keyEffectiveTime, DateTime keyExpirationTime, System::Collections::ObjectModel::ReadOnlyCollection<System::IdentityModel::Policy::IAuthorizationPolicy ^> ^ authorizationPolicies, System::ServiceModel::Security::SecurityStateEncoder ^ securityStateEncoder);
public static System.ServiceModel.Security.Tokens.SecurityContextSecurityToken CreateCookieSecurityContextToken (System.Xml.UniqueId contextId, string id, byte[] key, DateTime validFrom, DateTime validTo, System.Xml.UniqueId keyGeneration, DateTime keyEffectiveTime, DateTime keyExpirationTime, System.Collections.ObjectModel.ReadOnlyCollection<System.IdentityModel.Policy.IAuthorizationPolicy> authorizationPolicies, System.ServiceModel.Security.SecurityStateEncoder securityStateEncoder);
static member CreateCookieSecurityContextToken : System.Xml.UniqueId * string * byte[] * DateTime * DateTime * System.Xml.UniqueId * DateTime * DateTime * System.Collections.ObjectModel.ReadOnlyCollection<System.IdentityModel.Policy.IAuthorizationPolicy> * System.ServiceModel.Security.SecurityStateEncoder -> System.ServiceModel.Security.Tokens.SecurityContextSecurityToken
Public Shared Function CreateCookieSecurityContextToken (contextId As UniqueId, id As String, key As Byte(), validFrom As DateTime, validTo As DateTime, keyGeneration As UniqueId, keyEffectiveTime As DateTime, keyExpirationTime As DateTime, authorizationPolicies As ReadOnlyCollection(Of IAuthorizationPolicy), securityStateEncoder As SecurityStateEncoder) As SecurityContextSecurityToken

参数

contextId
UniqueId

一个表示上下文 ID 的 UniqueId

id
String

令牌 ID。

key
Byte[]

一个表示密钥的字节数组。

validFrom
DateTime

有效的起始时间。

validTo
DateTime

过期时间。

keyGeneration
UniqueId

一个表示密钥生成的 UniqueId

keyEffectiveTime
DateTime

密钥的有效起始时间。

keyExpirationTime
DateTime

密钥的过期时间。

authorizationPolicies
ReadOnlyCollection<IAuthorizationPolicy>

IAuthorizationPolicy 实例的一个只读集合。

securityStateEncoder
SecurityStateEncoder

安全状态编码器。

返回

SecurityContextSecurityToken

一个安全上下文令牌 Cookie。

适用于