mscorlib(4.0.0.0) API with additions
|
Provides storage for multiple credentials. More...
Public Member Functions | |
CredentialCache () | |
Creates a new instance of the T:System.Net.CredentialCache class. More... | |
void | Add (Uri uriPrefix, string authType, NetworkCredential cred) |
Adds a T:System.Net.NetworkCredential instance to the credential cache for use with protocols other than SMTP and associates it with a Uniform Resource Identifier (URI) prefix and authentication protocol. More... | |
void | Add (string host, int port, string authenticationType, NetworkCredential credential) |
Adds a T:System.Net.NetworkCredential instance for use with SMTP to the credential cache and associates it with a host computer, port, and authentication protocol. Credentials added using this method are valid for SMTP only. This method does not work for HTTP or FTP requests. More... | |
void | Remove (Uri uriPrefix, string authType) |
Deletes a T:System.Net.NetworkCredential instance from the cache if it is associated with the specified Uniform Resource Identifier (URI) prefix and authentication protocol. More... | |
void | Remove (string host, int port, string authenticationType) |
Deletes a T:System.Net.NetworkCredential instance from the cache if it is associated with the specified host, port, and authentication protocol. More... | |
NetworkCredential | GetCredential (Uri uriPrefix, string authType) |
Returns the T:System.Net.NetworkCredential instance associated with the specified Uniform Resource Identifier (URI) and authentication type. More... | |
NetworkCredential | GetCredential (string host, int port, string authenticationType) |
Returns the T:System.Net.NetworkCredential instance associated with the specified host, port, and authentication protocol. More... | |
IEnumerator | GetEnumerator () |
Returns an enumerator that can iterate through the T:System.Net.CredentialCache instance. More... | |
Properties | |
static ICredentials | DefaultCredentials [get] |
Gets the system credentials of the application. More... | |
static NetworkCredential | DefaultNetworkCredentials [get] |
Gets the network credentials of the current security context. More... | |
Provides storage for multiple credentials.
Definition at line 8 of file CredentialCache.cs.
System.Net.CredentialCache.CredentialCache | ( | ) |
Creates a new instance of the T:System.Net.CredentialCache class.
Definition at line 103 of file CredentialCache.cs.
void System.Net.CredentialCache.Add | ( | Uri | uriPrefix, |
string | authType, | ||
NetworkCredential | cred | ||
) |
Adds a T:System.Net.NetworkCredential instance to the credential cache for use with protocols other than SMTP and associates it with a Uniform Resource Identifier (URI) prefix and authentication protocol.
uriPrefix | A T:System.Uri that specifies the URI prefix of the resources that the credential grants access to. |
authType | The authentication scheme used by the resource named in uriPrefix . |
cred | The T:System.Net.NetworkCredential to add to the credential cache. |
T:System.ArgumentNullException | uriPrefix is null . -or- authType is null . |
T:System.ArgumentException | The same credentials are added more than once. |
Definition at line 116 of file CredentialCache.cs.
void System.Net.CredentialCache.Add | ( | string | host, |
int | port, | ||
string | authenticationType, | ||
NetworkCredential | credential | ||
) |
Adds a T:System.Net.NetworkCredential instance for use with SMTP to the credential cache and associates it with a host computer, port, and authentication protocol. Credentials added using this method are valid for SMTP only. This method does not work for HTTP or FTP requests.
host | A T:System.String that identifies the host computer. |
port | A T:System.Int32 that specifies the port to connect to on host . |
authenticationType | A T:System.String that identifies the authentication scheme used when connecting to host using cred . See Remarks. |
credential | The T:System.Net.NetworkCredential to add to the credential cache. |
T:System.ArgumentNullException | host is null . -or- authType is null . |
T:System.ArgumentException | authType not an accepted value. See Remarks. |
T:System.ArgumentOutOfRangeException | port is less than zero. |
Definition at line 152 of file CredentialCache.cs.
NetworkCredential System.Net.CredentialCache.GetCredential | ( | Uri | uriPrefix, |
string | authType | ||
) |
Returns the T:System.Net.NetworkCredential instance associated with the specified Uniform Resource Identifier (URI) and authentication type.
uriPrefix | A T:System.Uri that specifies the URI prefix of the resources that the credential grants access to. |
authType | The authentication scheme used by the resource named in uriPrefix . |
null
.T:System.ArgumentNullException | uriPrefix or authType is null . |
Implements System.Net.ICredentials.
Definition at line 227 of file CredentialCache.cs.
NetworkCredential System.Net.CredentialCache.GetCredential | ( | string | host, |
int | port, | ||
string | authenticationType | ||
) |
Returns the T:System.Net.NetworkCredential instance associated with the specified host, port, and authentication protocol.
host | A T:System.String that identifies the host computer. |
port | A T:System.Int32 that specifies the port to connect to on host . |
authenticationType | A T:System.String that identifies the authentication scheme used when connecting to host . See Remarks. |
null
.T:System.ArgumentNullException | host is null . -or- authType is null . |
T:System.ArgumentException | authType not an accepted value. See Remarks. -or- host is equal to the empty string (""). |
T:System.ArgumentOutOfRangeException | port is less than zero. |
Implements System.Net.ICredentialsByHost.
Definition at line 270 of file CredentialCache.cs.
IEnumerator System.Net.CredentialCache.GetEnumerator | ( | ) |
Returns an enumerator that can iterate through the T:System.Net.CredentialCache instance.
Implements System.Collections.IEnumerable.
Definition at line 304 of file CredentialCache.cs.
void System.Net.CredentialCache.Remove | ( | Uri | uriPrefix, |
string | authType | ||
) |
Deletes a T:System.Net.NetworkCredential instance from the cache if it is associated with the specified Uniform Resource Identifier (URI) prefix and authentication protocol.
uriPrefix | A T:System.Uri that specifies the URI prefix of the resources that the credential is used for. |
authType | The authentication scheme used by the host named in uriPrefix . |
Definition at line 187 of file CredentialCache.cs.
void System.Net.CredentialCache.Remove | ( | string | host, |
int | port, | ||
string | authenticationType | ||
) |
Deletes a T:System.Net.NetworkCredential instance from the cache if it is associated with the specified host, port, and authentication protocol.
host | A T:System.String that identifies the host computer. |
port | A T:System.Int32 that specifies the port to connect to on host . |
authenticationType | A T:System.String that identifies the authentication scheme used when connecting to host . See Remarks. |
Definition at line 206 of file CredentialCache.cs.
|
staticget |
Gets the system credentials of the application.
Definition at line 79 of file CredentialCache.cs.
|
staticget |
Gets the network credentials of the current security context.
Definition at line 92 of file CredentialCache.cs.