WSFederationHttpSecurityMode 枚举
定义
为 WSFederationHttpBinding 指定不同的安全模式。Specifies the different security modes for WSFederationHttpBinding.
public enum class WSFederationHttpSecurityMode
public enum WSFederationHttpSecurityMode
type WSFederationHttpSecurityMode =
Public Enum WSFederationHttpSecurityMode
- 继承
字段
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. 此模式相当于将 |
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. |
示例
下面的代码演示如何将 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
注解
此枚举定义 WSFederationHttpBinding 支持的安全模式。This enumeration defines the security modes that the WSFederationHttpBinding supports.