Mono Class Library: System.Net.ICredentials Overview | Members

System.Net.ICredentials.GetCredential Method

Returns a System.Net.NetworkCredential object that is associated with a Uniform Resource Identifier (URI) and authentication type. [Edit]

public NetworkCredential GetCredential (Uri uri, string authType)

Parameters

uri
A Uri representing the URI for which the client is providing authentication. [Edit]
authType
A string containing the type of authentication. This value is required to be identical to the IAuthenticationModule.AuthenticationType of the authentication module that uses the credential returned by this method. [Edit]

Returns

A System.Net.NetworkCredential associated with the specified URI and authentication type, or null if the credentials cannot be provided. [Edit]

Remarks

Operation
As described above.

Note to Inheritors
Implement this method to return credentials information appropriate for the specified authentication type.

Usage
This method returns an object suitable for passing to the IAuthenticationModule.Authenticate(string, WebRequest, ICredentials) method of the authorization module registered for the specified authentication type. For additional information, see AuthenticationManager.Register(IAuthenticationModule).

[Edit]

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0