Partager via


FederatedMessageSecurityOverHttp.IssuedKeyType Propriété

Définition

Spécifie le type de clé à émettre.

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

Valeur de propriété

SecurityKeyType La valeur par défaut est SymmetricKey.

Exceptions

La valeur n'est pas un SecurityKeyType valide.

Exemples

Le code suivant montre comment accéder à cette propriété depuis la liaison et la définir.

// 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

Remarques

Les valeurs valides de SecurityKeyType sont SymmetricKey et AsymmetricKey.

S’applique à