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
權杖識別碼。
- 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
權杖識別碼。
- key
- Byte[]
代表金鑰的位元組陣列。
- validFrom
- DateTime
有效的開始時間。
- validTo
- DateTime
到期時間。
- keyEffectiveTime
- DateTime
金鑰的有效開始時間。
- keyExpirationTime
- DateTime
金鑰到期時間。
- authorizationPolicies
- ReadOnlyCollection<IAuthorizationPolicy>
IAuthorizationPolicy 執行個體的唯讀集合。
- securityStateEncoder
- SecurityStateEncoder
安全性狀態編碼器。
傳回
安全性內容權杖 Cookie。