SymmetricSecurityBindingElement.ProtectionTokenParameters 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定保護權杖參數。
public:
property System::ServiceModel::Security::Tokens::SecurityTokenParameters ^ ProtectionTokenParameters { System::ServiceModel::Security::Tokens::SecurityTokenParameters ^ get(); void set(System::ServiceModel::Security::Tokens::SecurityTokenParameters ^ value); };
public System.ServiceModel.Security.Tokens.SecurityTokenParameters ProtectionTokenParameters { get; set; }
member this.ProtectionTokenParameters : System.ServiceModel.Security.Tokens.SecurityTokenParameters with get, set
Public Property ProtectionTokenParameters As SecurityTokenParameters
屬性值
範例
下列程式碼將示範如何設定這個屬性。
// Create a SymmetricSecurityBindingElement.
SymmetricSecurityBindingElement ssbe =
new SymmetricSecurityBindingElement();
// Set the algorithm suite to one that uses 128-bit keys.
ssbe.DefaultAlgorithmSuite = SecurityAlgorithmSuite.Basic128;
// Set MessageProtectionOrder to SignBeforeEncrypt.
ssbe.MessageProtectionOrder = MessageProtectionOrder.SignBeforeEncrypt;
// Use a Kerberos token as the protection token.
ssbe.ProtectionTokenParameters = new KerberosSecurityTokenParameters();