public interface ICredentials
System
Networking
Implemented by types that supply network credentials used to authenticate clients.
The ICredentials interface defines the System.Net.ICredentials.GetCredential(System.Uri,System.String) method, which is used to supply network credentials for client authentication.
System.Net Namespace
ICredentials Methods
NetworkCredential GetCredential(Uri uri, string authType);
Returns a NetworkCredential object that is associated with a Uniform Resource Identifier (URI) and authentication type.
- uri
- A Uri representing the URI for which the client is providing authentication.
- authType
- A String containing the type of authentication. This value is required to be identical to the System.Net.IAuthenticationModule.AuthenticationType of the authentication module that uses the credential returned by this method.
A NetworkCredential associated with the specified URI and authentication type, ornull
if the credentials cannot be provided.
[Behaviors: As described above.]
[Overrides: Implement this method to return credentials information appropriate for the specified authentication type.]
[Usage: This method returns an object suitable for passing to the System.Net.IAuthenticationModule.Authenticate(System.String,System.Net.WebRequest,System.Net.ICredentials) method of the authorization module registered for the specified authentication type. For additional information, see System.Net.AuthenticationManager.Register(System.Net.IAuthenticationModule).]
System.Net.ICredentials Interface, System.Net Namespace