ICredentials Interface

System.Net

Summary

Defines the contract that network credentials must implement.

Remarks

The ICredentials interface is implemented by classes that provide network credentials to an application.

This interface is used by classes such as WebClient and HttpClient to authenticate with network resources.

The most common implementation is the NetworkCredential class, which allows you to specify a username, password, and domain.

Interface Members

Properties

Properties

GetCredential()

System.Net.NetworkCredential GetCredential();

Retrieves the NetworkCredential for this instance.

Remarks

This method is called by network classes to obtain the credentials required for authentication.

Return Value

A NetworkCredential object that contains the user's credentials.