AuthenticationSchemeSelector Delegate


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Selects the authentication scheme for an HttpListener instance.

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

public delegate AuthenticationSchemes AuthenticationSchemeSelector(
	HttpListenerRequest^ httpRequest


Type: System.Net::HttpListenerRequest^

The HttpListenerRequest instance for which to select an authentication scheme.

Return Value

Type: System.Net::AuthenticationSchemes

One of the AuthenticationSchemes values that indicates the method of authentication to use for the specified client request.

Delegates of this type are used by HttpListener instances to select an authentication scheme based on the characteristics of a request.

An AuthenticationSchemeSelector delegate is passed an HttpListenerRequest object for each incoming request that has not provided authentication information. The method invoked by the delegate uses the HttpListenerRequest object and any other available information to decide which authentication scheme to require. The delegate is specified by using the AuthenticationSchemeSelectorDelegate property.

The following example uses an instance of this type to set the AuthenticationSchemeSelectorDelegate property.

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

The following example shows the implementation of the method invoked by the AuthenticationSchemeSelector delegate in the previous example.

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

.NET Framework
Available since 2.0
Return to top