<clientCredentials>

指定用于向服务验证客户端身份的凭据。

架构层次结构

<system.serviceModel>
  <behaviors>
    <endpointBehaviors>
      <endpointBehaviors> 的 <behavior>
        <clientCredentials>

语法

<clientCredentials type="String"
      supportInteractive="Boolean" >
   <clientCertificate>
   </clientCertificate>
   <digest>
   </digest>
   <isuedToken>
   </isuedToken>
   <peer>
   </peer>
   <serviceCertificate>
   </serviceCertificate>
   <windowsAuthentication>
   </windowsAuthentication>
</clientCredentials>

属性和元素

以下几节描述了特性、子元素和父元素。

属性

特性 说明

supportInteractive

一个布尔值,指定在运行时选择客户端凭据的过程中是否可以涉及交互式用户。默认值为 true

type

一个指定此配置元素的类型的字符串。

子元素

元素 说明

<clientCredentials> 的 <clientCertificate> 元素

指定用于向服务验证客户端身份的证书。此元素的类型为 X509InitiatorCertificateClientElement

<httpDigest> 元素

指定用于向服务验证客户端身份的摘要。此元素的类型为 HttpDigestClientElement

<issuedToken>

指定用于向安全令牌服务 (STS) 验证客户端身份的自定义令牌类型。此元素的类型为 IssuedTokenClientElement

<clientCredentials> 的 <peer> 元素

指定一个当前对等凭据。此元素的类型为 PeerCredentialElement

<clientCredentials> 的 <serviceCertificate> 元素

指定用于向客户端验证服务身份的证书,并提供一个用于设置证书选项的结构。必须从服务以带外方式向客户端提供此证书。此元素的类型为 X509RecipientCertificateClientElement

<clientCredentials> 的 <windows> 元素

指定 Windows 凭据。默认值是当前线程的凭据。此元素的类型为 WindowsClientElement

父元素

元素 说明

<endpointBehaviors> 的 <behavior>

指定终结点行为。

备注

在要求相互进行身份验证的情况下,需要使用客户端凭据使客户端通过服务的身份验证。当客户端必须使用服务的证书来保护发送到服务的消息时,还可以使用该配置节来指定服务证书。

另请参见

参考

ClientCredentialsElement
ClientCredentials

其他资源

Security Behaviors in WCF
Securing Clients