Upravit

Sdílet prostřednictvím


BasicHttpMessageCredentialType Enum

Definition

Enumerates credential types the client can authenticate with when security is enabled in the BasicHttpBinding binding.

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

Fields

Name Value Description
UserName 0

Indicates that the client be authenticated using a username credential.

Certificate 1

Indicates that a client be authenticated using a certificate.

Examples

The following configuration file snippets illustrates how to specify BasicHttpMessageCredentialType:

The important sections are:

The bindings section where we specify the security mode (Message) and the type of credential that will be used to authenticate the client:

The behaviors section where we specify the certificate to use for service authentication and the method for validating the client certificate:

Remarks

If Mode is configured to perform client authentication at the message level, this enumeration controls the client credential type. Both username and X.509 certificate to use must be provisioned through an IEndpointBehavior instance which implements the SecurityCredentialsManager extensibility point; in a common default case this is ClientCredentials.

The client credential in the certificate case must be specified using the ClientCertificate property of the ClientCredentials class.

The client credential in the username case must be specified using the UserName property of the ClientCredentials class.

In addition, when message security mode is used, the client must be provisioned with the service's certificate. The service credential in this case must be specified using the ServiceCertificate property on the ClientCredentials class.

Applies to