SecurityContextSecurityToken.CreateCookieSecurityContextToken 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建安全上下文令牌 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
参数
- id
- String
令牌 ID。
- key
- Byte[]
一个表示密钥的字节数组。
- validFrom
- DateTime
有效的起始时间。
- validTo
- DateTime
过期时间。
- authorizationPolicies
- ReadOnlyCollection<IAuthorizationPolicy>
IAuthorizationPolicy 实例的一个只读集合。
- securityStateEncoder
- SecurityStateEncoder
安全状态编码器。
返回
一个安全上下文令牌 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
参数
- id
- String
令牌 ID。
- key
- Byte[]
一个表示密钥的字节数组。
- validFrom
- DateTime
有效的起始时间。
- validTo
- DateTime
过期时间。
- keyEffectiveTime
- DateTime
密钥的有效起始时间。
- keyExpirationTime
- DateTime
密钥的过期时间。
- authorizationPolicies
- ReadOnlyCollection<IAuthorizationPolicy>
IAuthorizationPolicy 实例的一个只读集合。
- securityStateEncoder
- SecurityStateEncoder
安全状态编码器。
返回
一个安全上下文令牌 Cookie。