Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Net.​NetworkCredential
Assembly: System.Net.Primitives
Inheritance: object → NetworkCredential
Provides credentials for password-based authentication schemes such as basic, digest, NTLM, and Kerberos authentication.
Properties
public
string
Domain
Gets or sets the domain or computer name that verifies the credentials.
public
string
Password
Gets or sets the password for the user name associated with the credentials.
SecurePassword
Gets or sets the password as a <see cref="T:System.Security.SecureString" /> instance.
public
string
UserName
Gets or sets the user name associated with the credentials.
Methods
public
NetworkCredential
GetCredential​(string host,
int port,
string authenticationType)
host
The host computer that authenticates the client.
port
The port on the <paramref name="host" /> that the client communicates with.
authenticationType
The type of authentication requested, as defined in the <see cref="P:System.Net.IAuthenticationModule.AuthenticationType" /> property.
Returns A <see cref="T:System.Net.NetworkCredential" /> for the specified host, port, and authentication protocol, or <see langword="null" /> if there are no credentials available for the specified host, port, and authentication protocol.
Returns an instance of the <see cref="T:System.Net.NetworkCredential" /> class for the specified host, port, and authentication type.
public
NetworkCredential
GetCredential​(Uri uri,
string authenticationType)
uri
The URI that the client provides authentication for.
Returns A <see cref="T:System.Net.NetworkCredential" /> object.
Returns an instance of the <see cref="T:System.Net.NetworkCredential" /> class for the specified Uniform Resource Identifier (URI) and authentication type.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object