Export (0) Print
Expand All

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

Parameters

challenge
Type: System.String

The authentication challenge sent by the server.

request
Type: System.Net.WebRequest

The WebRequest instance associated with the challenge.

credentials
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.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft