System.Net.ICredentials Interface

Assembly: System.dll
Namespace: System.Net
Summary
Provides the base authentication interface for retrieving credentials for Web client authentication.
C# Syntax:
public interface ICredentials
Remarks
The ICredentials interface provides the ICredentials.GetCredential method to objects that supply network credentials to applications.
See also:
System.Net Namespace

System.Net.ICredentials Member List:

Public Methods
GetCredential Returns a NetworkCredential object that is associated with the specified URI, and authentication type.

System.Net.ICredentials Member Details

Method: GetCredential(
   Uri uri,
   string authType
)
Summary
Returns a NetworkCredential object that is associated with the specified URI, and authentication type.
C# Syntax:
NetworkCredential GetCredential(
   Uri uri,
   string authType
);
Parameters:

uri

The Uri that the client is providing authentication for.

authType

The type of authentication, as defined in the IAuthenticationModule.AuthenticationType property.

Return Value:
The NetworkCredential associated with the specified URI and authentication type, or if no credentials are available, null.
Remarks
The ICredentials.GetCredential method returns a NetworkCredential instance that contains the credentials associated with the specified URI and authorization scheme. When no credentials are available, the ICredentials.GetCredential method returns null.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.