Manages the authentication modules called during the client authentication process.
More...
|
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...
|
|
Manages the authentication modules called during the client authentication process.
Definition at line 8 of file AuthenticationManager.cs.
◆ Authenticate()
Calls each registered authentication module to find the first module that can respond to the authentication request.
- Parameters
-
challenge | The challenge returned by the Internet resource. |
request | The T:System.Net.WebRequest that initiated the authentication challenge. |
credentials | The 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.ArgumentNullException | challenge is null .-or- request is null .-or- credentials is null . |
Definition at line 134 of file AuthenticationManager.cs.
◆ PreAuthenticate()
Preauthenticates a request.
- Parameters
-
request | A T:System.Net.WebRequest to an Internet resource. |
credentials | The 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.ArgumentNullException | request is null . |
Definition at line 145 of file AuthenticationManager.cs.
◆ Register()
Registers an authentication module with the authentication manager.
- Parameters
-
authenticationModule | The T:System.Net.IAuthenticationModule to register with the authentication manager. |
- Exceptions
-
T:System.ArgumentNullException | authenticationModule is null . |
Definition at line 154 of file AuthenticationManager.cs.
◆ Unregister() [1/2]
Removes the specified authentication module from the list of registered modules.
- Parameters
-
authenticationModule | The T:System.Net.IAuthenticationModule to remove from the list of registered modules. |
- Exceptions
-
T:System.ArgumentNullException | authenticationModule is null . |
T:System.InvalidOperationException | The 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
-
authenticationScheme | The authentication scheme of the module to remove. |
- Exceptions
-
T:System.ArgumentNullException | authenticationScheme is null . |
T:System.InvalidOperationException | A module for this authentication scheme is not registered. |
Definition at line 176 of file AuthenticationManager.cs.
◆ 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.
◆ CredentialPolicy
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: