AsymmetricSecurityBindingElement.InitiatorTokenParameters 属性

定义

指定发起方的令牌定义。

public:
 property System::ServiceModel::Security::Tokens::SecurityTokenParameters ^ InitiatorTokenParameters { System::ServiceModel::Security::Tokens::SecurityTokenParameters ^ get(); void set(System::ServiceModel::Security::Tokens::SecurityTokenParameters ^ value); };
public System.ServiceModel.Security.Tokens.SecurityTokenParameters InitiatorTokenParameters { get; set; }
member this.InitiatorTokenParameters : System.ServiceModel.Security.Tokens.SecurityTokenParameters with get, set
Public Property InitiatorTokenParameters As SecurityTokenParameters

属性值

用于包含令牌定义的 SecurityTokenParameters

示例

下面的代码显示一个引用此属性的示例。

AsymmetricSecurityBindingElement abe =
    (AsymmetricSecurityBindingElement)SecurityBindingElement.
    CreateMutualCertificateBindingElement(
    MessageSecurityVersion.
    WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10);

abe.SetKeyDerivation(false);

X509SecurityTokenParameters istp =
   abe.InitiatorTokenParameters as X509SecurityTokenParameters;
if (istp != null)
{
    istp.X509ReferenceStyle =
    X509KeyIdentifierClauseType.IssuerSerial;
}
Dim abe As AsymmetricSecurityBindingElement = CType(SecurityBindingElement.CreateMutualCertificateBindingElement(MessageSecurityVersion.WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10), AsymmetricSecurityBindingElement)

abe.SetKeyDerivation(False)

Dim istp As X509SecurityTokenParameters = TryCast(abe.InitiatorTokenParameters, X509SecurityTokenParameters)
If istp IsNot Nothing Then
    istp.X509ReferenceStyle = X509KeyIdentifierClauseType.IssuerSerial
End If

注解

此属性会获取和设置一个类,该类包含发起通信一方的令牌属性。

适用于