Type System.Net.IAuthenticationModule

Variables:

public System.String AuthenticationType

public System.Boolean CanPreAuthenticate

Constructors:
Functions:

public System.Net.Authorization Authenticate(System.String challenge, System.Net.WebRequest request, System.Net.ICredentials credentials)

Returns an instance of the System.Net.Authorization class that provides a response to an authentication challenge.

Parameter challenge: A System.String containing the authentication challenge sent by the server. The content of this string is determined by the authentication protocol(s) used by the server that issued the challenge.

Parameter request: The System.Net.WebRequest instance that received challenge .

Parameter credentials: The credentials of the System.Net.WebRequest instance that received challenge .

Returns: A System.Net.Authorization instance containing the challenge response, or null if the challenge cannot be handled.

If the authentication module can handle challenge , this method proceeds with the authentication in accordance with the authentication protocol implemented by the current instance and returns a System.Net.Authorization instance containing the challenge response. If the authentication module cannot handle the challenge, this method returns null. If the authentication module encounters an error while conducting the authentication process, this method can, but is not required to throw an exception. Implement this method to receive and optionally handle requests for client authentication from the authentication manager. The System.Net.AuthenticationManager class invokes the System.Net.IAuthenticationModule.Authenticate(System.String,System.Net.WebRequest,System.Net.ICredentials) method on registered authentication modules to allow modules to handle a server challenge.

public System.Net.Authorization PreAuthenticate(System.Net.WebRequest request, System.Net.ICredentials credentials)

Returns an instance of the System.Net.Authorization class containing client authentication information.

Parameter request: The System.Net.WebRequest instance associated with the authentication request.

Parameter credentials: The credentials associated with the authentication request.

Returns: A System.Net.Authorization instance containing client authentication information to be sent with request, or null if the current instance does not support preauthentication.

This method returns an instance of the System.Net.Authorization class containing authentication information to be sent with the request. This method is required to return null if it cannot handle preauthentication requests from the authentication manager. Implement this method if the protocol implemented by the current instance supports preauthentication. This method is used by the authentication manager to handle requests by clients for authentication information that will be used to preempt a server's request for authentication. This method is not called unless the System.Net.IAuthenticationModule.CanPreAuthenticate property returns true.