FederatedMessageSecurityOverHttp.IssuedKeyType Свойство

Определение

Задает тип выдаваемого ключа.

public:
 property System::IdentityModel::Tokens::SecurityKeyType IssuedKeyType { System::IdentityModel::Tokens::SecurityKeyType get(); void set(System::IdentityModel::Tokens::SecurityKeyType value); };
public System.IdentityModel.Tokens.SecurityKeyType IssuedKeyType { get; set; }
member this.IssuedKeyType : System.IdentityModel.Tokens.SecurityKeyType with get, set
Public Property IssuedKeyType As SecurityKeyType

Значение свойства

Объект SecurityKeyType. Значение по умолчанию — SymmetricKey.

Исключения

Значение не является допустимым объектом SecurityKeyType.

Примеры

В следующем примере кода показано, как получить доступ к этому свойству из привязки и задать для него значение.

// This method creates a WSFederationHttpBinding.
public static WSFederationHttpBinding
    CreateWSFederationHttpBinding(bool isClient)
{
  // Create an instance of the WSFederationHttpBinding.
  WSFederationHttpBinding b = new WSFederationHttpBinding();

  // Set the security mode to Message.
  b.Security.Mode = WSFederationHttpSecurityMode.Message;

  // Set the Algorithm Suite to Basic256Rsa15.
  b.Security.Message.AlgorithmSuite = SecurityAlgorithmSuite.Basic256Rsa15;

  // Set NegotiateServiceCredential to true.
  b.Security.Message.NegotiateServiceCredential = true;

  // Set IssuedKeyType to Symmetric.
  b.Security.Message.IssuedKeyType = SecurityKeyType.SymmetricKey;
' This method creates a WSFederationHttpBinding.
Public Shared Function CreateWSFederationHttpBinding(ByVal isClient As Boolean) As WSFederationHttpBinding
  ' Create an instance of the WSFederationHttpBinding.
  Dim b As New WSFederationHttpBinding()

  ' Set the security mode to Message.
  b.Security.Mode = WSFederationHttpSecurityMode.Message

  ' Set the Algorithm Suite to Basic256Rsa15.
  b.Security.Message.AlgorithmSuite = SecurityAlgorithmSuite.Basic256Rsa15

  ' Set NegotiateServiceCredential to true.
  b.Security.Message.NegotiateServiceCredential = True

  ' Set IssuedKeyType to Symmetric.
  b.Security.Message.IssuedKeyType = SecurityKeyType.SymmetricKey

Комментарии

Допустимыми значениями объекта SecurityKeyType являются SymmetricKey и AsymmetricKey.

Применяется к