mscorlib(4.0.0.0) API with additions
System.Net.AuthenticationManager Class Reference

Manages the authentication modules called during the client authentication process. More...

Collaboration diagram for System.Net.AuthenticationManager:
[legend]

Static Public Member Functions

static Authorization Authenticate (string challenge, WebRequest request, ICredentials credentials)
 Calls each registered authentication module to find the first module that can respond to the authentication request. More...
 
static Authorization PreAuthenticate (WebRequest request, ICredentials credentials)
 Preauthenticates a request. More...
 
static void Register (IAuthenticationModule authenticationModule)
 Registers an authentication module with the authentication manager. More...
 
static void Unregister (IAuthenticationModule authenticationModule)
 Removes the specified authentication module from the list of registered modules. More...
 
static void Unregister (string authenticationScheme)
 Removes authentication modules with the specified authentication scheme from the list of registered modules. More...
 

Static Public Attributes

static StringDictionary CustomTargetNameDictionary => Instance.CustomTargetNameDictionary
 Gets the dictionary that contains Service Principal Names (SPNs) that are used to identify hosts during Kerberos authentication for requests made using T:System.Net.WebRequest and its derived classes. More...
 
static IEnumerator RegisteredModules => Instance.RegisteredModules
 Gets a list of authentication modules that are registered with the authentication manager. More...
 

Properties

static ICredentialPolicy CredentialPolicy [get, set]
 Gets or sets the credential policy to be used for resource requests made using the T:System.Net.HttpWebRequest class. More...
 

Detailed Description

Manages the authentication modules called during the client authentication process.

Definition at line 8 of file AuthenticationManager.cs.

Member Function Documentation

◆ Authenticate()

static Authorization System.Net.AuthenticationManager.Authenticate ( string  challenge,
WebRequest  request,
ICredentials  credentials 
)
static

Calls each registered authentication module to find the first module that can respond to the authentication request.

Parameters
challengeThe challenge returned by the Internet resource.
requestThe T:System.Net.WebRequest that initiated the authentication challenge.
credentialsThe T:System.Net.ICredentials associated with this request.
Returns
An instance of the T:System.Net.Authorization class containing the result of the authorization attempt. If there is no authentication module to respond to the challenge, this method returns null.
Exceptions
T:System.ArgumentNullExceptionchallenge is null.-or- request is null.-or- credentials is null.

Definition at line 134 of file AuthenticationManager.cs.

◆ PreAuthenticate()

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

Preauthenticates a request.

Parameters
requestA T:System.Net.WebRequest to an Internet resource.
credentialsThe T:System.Net.ICredentials associated with the request.
Returns
An instance of the T:System.Net.Authorization class if the request can be preauthenticated; otherwise, null. If credentials is null, this method returns null.
Exceptions
T:System.ArgumentNullExceptionrequest is null.

Definition at line 145 of file AuthenticationManager.cs.

◆ Register()

static void System.Net.AuthenticationManager.Register ( IAuthenticationModule  authenticationModule)
static

Registers an authentication module with the authentication manager.

Parameters
authenticationModuleThe T:System.Net.IAuthenticationModule to register with the authentication manager.
Exceptions
T:System.ArgumentNullExceptionauthenticationModule is null.

Definition at line 154 of file AuthenticationManager.cs.

◆ Unregister() [1/2]

static void System.Net.AuthenticationManager.Unregister ( IAuthenticationModule  authenticationModule)
static

Removes the specified authentication module from the list of registered modules.

Parameters
authenticationModuleThe T:System.Net.IAuthenticationModule to remove from the list of registered modules.
Exceptions
T:System.ArgumentNullExceptionauthenticationModule is null.
T:System.InvalidOperationExceptionThe specified T:System.Net.IAuthenticationModule is not registered.

Definition at line 165 of file AuthenticationManager.cs.

◆ Unregister() [2/2]

static void System.Net.AuthenticationManager.Unregister ( string  authenticationScheme)
static

Removes authentication modules with the specified authentication scheme from the list of registered modules.

Parameters
authenticationSchemeThe authentication scheme of the module to remove.
Exceptions
T:System.ArgumentNullExceptionauthenticationScheme is null.
T:System.InvalidOperationExceptionA module for this authentication scheme is not registered.

Definition at line 176 of file AuthenticationManager.cs.

Member Data Documentation

◆ CustomTargetNameDictionary

StringDictionary System.Net.AuthenticationManager.CustomTargetNameDictionary => Instance.CustomTargetNameDictionary
static

Gets the dictionary that contains Service Principal Names (SPNs) that are used to identify hosts during Kerberos authentication for requests made using T:System.Net.WebRequest and its derived classes.

Returns
A writable T:System.Collections.Specialized.StringDictionary that contains the SPN values for keys composed of host information.

Definition at line 55 of file AuthenticationManager.cs.

◆ RegisteredModules

IEnumerator System.Net.AuthenticationManager.RegisteredModules => Instance.RegisteredModules
static

Gets a list of authentication modules that are registered with the authentication manager.

Returns
An T:System.Collections.IEnumerator that enables the registered authentication modules to be read.

Definition at line 65 of file AuthenticationManager.cs.

Property Documentation

◆ CredentialPolicy

ICredentialPolicy System.Net.AuthenticationManager.CredentialPolicy
staticgetset

Gets or sets the credential policy to be used for resource requests made using the T:System.Net.HttpWebRequest class.

Returns
An object that implements the T:System.Net.ICredentialPolicy interface that determines whether credentials are sent with requests. The default value is null.

Definition at line 41 of file AuthenticationManager.cs.


The documentation for this class was generated from the following file: