WSFederationHttpSecurityMode Enum

Definition

指定 WSFederationHttpBinding 的各種安全性模式。Specifies the different security modes for WSFederationHttpBinding.

public enum class WSFederationHttpSecurityMode
public enum WSFederationHttpSecurityMode
type WSFederationHttpSecurityMode = 
Public Enum WSFederationHttpSecurityMode
Inheritance
WSFederationHttpSecurityMode

Fields

Message 1

完整性、機密性、伺服器驗證與用戶端驗證都可透過 SOAP 訊息安全性來提供。Integrity, confidentiality, server authentication and client authentication are provided using SOAP message security. 根據預設,本文會經過加密與簽署。By default, the body is encrypted and signed. 服務必須使用憑證來設定。The service must be configured with a certificate. 用戶端驗證係以安全性權杖服務對用戶端發行的權杖為基礎。Client authentication is based on the token issued to the client by a security token service.

None 0

傳輸期間的 SOAP 訊息是不安全的。The SOAP message is not secure during transfer. 未連絡任何安全性權杖服務。No Security Token Service is contacted. 此模式與使用 wsHttpBinding 繫結 (搭配 SecurityMode.None) 相同。This mode is equivalent to using the wsHttpBinding binding with SecurityMode.None.

TransportWithMessageCredential 2

完整性、機密性與伺服器驗證都是經由 HTTPS 來提供。Integrity, confidentiality and server authentication are provided by HTTPS. 服務必須使用憑證來設定。The service must be configured with a certificate. 用戶端驗證係透過 SOAP 訊息安全性方式提供,並以安全性權杖服務發行給用戶端之權杖為基礎。Client authentication is provided by means of SOAP message security and is based on the token issued to the client by a security token service.

Examples

下列程式碼示範如何將 Mode 設定為這個列舉的成員。The following code shows how to set Mode to a member of this enumeration.

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

Remarks

此列舉會定義 WSFederationHttpBinding 支援的安全性模式。This enumeration defines the security modes that the WSFederationHttpBinding supports.

Applies to