WSFederationHttpSecurityMode 列舉

定義

指定 WSFederationHttpBinding 的各種安全性模式。

public enum class WSFederationHttpSecurityMode
public enum WSFederationHttpSecurityMode
type WSFederationHttpSecurityMode = 
Public Enum WSFederationHttpSecurityMode
繼承
WSFederationHttpSecurityMode

欄位

Message 1

完整性、機密性、伺服器驗證與用戶端驗證都可透過 SOAP 訊息安全性來提供。 根據預設,本文會經過加密與簽署。 服務必須使用憑證來設定。 用戶端驗證係以安全性權杖服務對用戶端發行的權杖為基礎。

None 0

傳輸期間的 SOAP 訊息是不安全的。 未連絡任何安全性權杖服務。 此模式與使用 wsHttpBinding 繫結 (搭配 SecurityMode.None) 相同。

TransportWithMessageCredential 2

完整性、機密性與伺服器驗證都是經由 HTTPS 來提供。 服務必須使用憑證來設定。 用戶端驗證係透過 SOAP 訊息安全性方式提供,並以安全性權杖服務發行給用戶端之權杖為基礎。

範例

下列程式碼示範如何將 Mode 設定為這個列舉的成員。

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

備註

此列舉會定義 WSFederationHttpBinding 支援的安全性模式。

適用於