HttpClientCredentialType Enum
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enumerates the valid credential types for HTTP clients.
public enum class HttpClientCredentialType
public enum HttpClientCredentialType
type HttpClientCredentialType =
Public Enum HttpClientCredentialType
- Inheritance
Name | Value | Description |
---|---|---|
None | 0 | Specifies anonymous authentication. |
Basic | 1 | Specifies Basic authentication. For more information, see RFC 2617 - HTTP Authentication: Basic and Digest Authentication. |
Digest | 2 | Specifies Digest authentication. For more information, see RFC 2617 - HTTP Authentication: Basic and Digest Authentication. |
Ntlm | 3 | Specifies client authentication using NTLM. |
Windows | 4 | Specifies client authentication using Windows. |
Certificate | 5 | Specifies client authentication using a certificate. |
InheritedFromHost | 6 | The authentication is inherited from the host. |
The following code shows how to set ClientCredentialType to a member of this enumeration.
// The code uses a shortcut to specify the security mode to Transport.
WSHttpBinding b = new WSHttpBinding(SecurityMode.Transport);
b.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;
' The code uses a shortcut to specify the security mode to Transport.
Dim b As WSHttpBinding = New WSHttpBinding(SecurityMode.Transport)
b.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows
This enumeration is used by ClientCredentialType to specify the type of client credential to be used for authentication.
Note that if SecurityMode is set to TransportWithMessageCredential, then the value of HttpClientCredentialType is ignored.
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided) |
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
UWP | 10.0 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: