AuthenticationClient Class
Namespace: System.Net.Security
Assembly: System (in System.dll)
Summary:
Provides functionality for authenticating a client using various authentication protocols. This class is a foundational component for secure network communication, enabling clients to establish authenticated sessions with servers.
Syntax
public abstract class AuthenticationClient
Remarks
The AuthenticationClient class is an abstract base class. You will typically use one of its derived classes, such as NegotiateClient, KerberosClient, or NTlmClient, to perform specific authentication mechanisms.
This class is part of the security framework for .NET and is used in conjunction with classes like NetworkCredential and TokenImpersonationLevel to manage security contexts during network operations.
Inheritance Hierarchy
- Object
- AuthenticationClient
Derived Classes
- NegotiateClient Implements the Negotiate authentication protocol.
- KerberosClient Implements the Kerberos authentication protocol.
- NTlmClient Implements the NTLM authentication protocol.
Methods
- Authenticate(string targetName, NetworkCredential credential) Performs the client-side authentication process.
- CompleteAuthentication(byte[] incomingBlob) Processes the server's response blob to complete authentication.
- Dispose() Releases unmanaged resources and disposes of the object.
Methods (Details)
Authenticate
protected abstract byte[] Authenticate(
string targetName,
NetworkCredential credential
)
- Parameters
- targetName
- The target service principal name (SPN).
- credential
- The network credentials to use for authentication.
Returns a byte array representing the initial authentication token to be sent to the server.
CompleteAuthentication
protected abstract byte[] CompleteAuthentication(
byte[] incomingBlob
)
- Parameters
- incomingBlob
- The byte array received from the server containing authentication information.
Returns a byte array representing the next authentication token to be sent to the server, or null if authentication is complete.
Dispose
protected virtual void Dispose()
This method is called to release resources.