แก้ไข

แชร์ผ่าน


<clientCredentials>

Specifies the credentials used to authenticate the client to a service.

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

Syntax

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

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description
supportInteractive A Boolean value that specifies whether an interactive user can be involved in selecting a client credential at run time. The default value is true.
type A string that specifies the type of this configuration element.

Child Elements

Element Description
<clientCertificate> Specifies the certificate used to authenticate the client to the service. This element is of type X509InitiatorCertificateClientElement.
<httpDigest> Specifies a digest used to authenticate the client to the service. This element is of type HttpDigestClientElement.
<issuedToken> Specifies a custom token type used to authenticate the client to a Secure Token Service (STS). This element is of type IssuedTokenClientElement.
<peer> Specifies a current peer credential. This element is of type PeerCredentialElement.
<serviceCertificate> Specifies the certificate used to authenticate the service to the client and provides a structure for setting certificate options. This certificate must be supplied out-of-band from the service to the client. This element is of type X509RecipientCertificateClientElement.
<windows> Specifies a Windows credential. The default is the credential of the current thread. This element is of type WindowsClientElement.

Parent Elements

Element Description
<behavior> Specifies an endpoint behavior.

Remarks

Client credentials are used to authenticate the client to services in cases where mutual authentication is required. This configuration section can also be used to specify service certificates for scenarios where the client must secure messages to a service with the service's certificate.

See also