This documentation is archived and is not being maintained.

IAuthenticationModule.Authenticate Method

Returns an instance of the Authorization class in respose to an authentication challenge from a server.

Namespace:  System.Net
Assembly:  System (in System.dll)

abstract Authenticate : 
        challenge:string * 
        request:WebRequest * 
        credentials:ICredentials -> Authorization 


Type: System.String
The authentication challenge sent by the server.
Type: System.Net.WebRequest
The WebRequest instance associated with the challenge.
Type: System.Net.ICredentials
The credentials associated with the challenge.

Return Value

Type: System.Net.Authorization
An Authorization instance containing the authorization message for the request, or a null reference (Nothing in Visual Basic) if the challenge cannot be handled.

The Authenticate method conducts the authentication process with the server and returns an Authorization instance to the AuthenticationManager.

Notes to Implementers

The AuthenticationManager calls the Authenticate method on registered authentication modules to determine which module handles the challenge. If the authentication module cannot handle the challenge, the Authenticate method must return a null reference (Nothing in Visual Basic). If the authentication module encounters an error while conducting the authentication process, Authenticate must throw an exception.

The following example shows how to use the Authenticate method. For a complete example refer to the AuthenticationManager class.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.