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();