HttpAuthenticationScheme Enum
System.Net.SecuritySpecifies the HTTP authentication schemes that can be used to authenticate clients with a server.
Syntax
public enum HttpAuthenticationScheme
Remarks
This enumeration is used by the HttpClient.DefaultRequestHeaders.Common.Authorization.Scheme property to specify the authentication scheme.
When you are using HTTP authentication, the server requests authentication from the client by sending an HTTP response with a 401 Unauthorized status code and a WWW-Authenticate header. The WWW-Authenticate header specifies the authentication schemes that the server supports.
The client can then respond with a GET or POST request that includes an Authorization header containing credentials that are appropriate for one of the authentication schemes supported by the server.
Members
-
Anonymous
Specifies that no authentication is required.
-
Basic
Specifies Basic authentication. This is a simple authentication scheme where credentials are sent in clear text.
-
Digest
Specifies Digest authentication. This is a more secure authentication scheme than Basic authentication that uses a challenge-response mechanism.
-
Negotiate
Specifies Negotiate authentication. This scheme allows the client and server to negotiate the most secure authentication method available, typically Kerberos or NTLM.
-
NTLM
Specifies NTLM authentication. This is a challenge-response authentication protocol used in Windows environments.
-
Kerberos
Specifies Kerberos authentication. This is a network authentication protocol that uses cryptography to provide strong authentication for client/server applications.
-
Custom
Specifies a custom authentication scheme that is not defined by the other members of this enumeration.
Requirements
| Package | Assembly |
|---|---|
| .NET Core 2.0, .NET Framework 4.5 | System.Net.Primitives.dll, System.dll |