xtd 0.2.0
xtd::net::network_credential Class Reference

Definition

Provides credentials for password-based authentication schemes such as basic, digest, NTLM, and Kerberos authentication.

Header
#include <xtd/net/network_credential>
Namespace
xtd::net
Library
xtd.core

Constructors

 network_credential ()=default
 Initializes a new instance of the xtd::net::network_credential class. More...
 
 network_credential (const xtd::ustring &user_name, const xtd::security::secure_string &password)
 Initializes a new instance of the xtd::net::network_credential class with the specified user name and password. More...
 
 network_credential (const xtd::ustring &user_name, const xtd::ustring &password)
 Initializes a new instance of the xtd::net::network_credential class with the specified user name and password. More...
 
 network_credential (const xtd::ustring &user_name, const xtd::security::secure_string &password, const xtd::ustring &domain)
 Initializes a new instance of the xtd::net::network_credential class with the specified user name, password and domain. More...
 
 network_credential (const xtd::ustring &user_name, const xtd::ustring &password, const xtd::ustring &domain)
 Initializes a new instance of the xtd::net::network_credential class with the specified user name, password and domain. More...
 

Properties

const xtd::ustringdomain () const noexcept
 Gets the domain or computer name that verifies the credentials. More...
 
network_credentialdomain (const xtd::ustring &value) noexcept
 Sets the domain or computer name that verifies the credentials. More...
 
xtd::ustring password () const noexcept
 Gets the password for the user name associated with the credentials. More...
 
network_credentialpassword (const xtd::ustring &value) noexcept
 Sets the password for the user name associated with the credentials. More...
 
const xtd::security::secure_stringsecure_password () const noexcept
 Gets the password as a xtd::security::secure_string instance. More...
 
network_credentialsecure_password (const xtd::security::secure_string &value) noexcept
 Sets the password as a xtd::security::secure_string instance. More...
 
const xtd::ustringuser_name () const noexcept
 Gets the user name associated with the credentials. More...
 
network_credentialuser_name (const xtd::ustring &value) noexcept
 Sets the user name associated with the credentials. More...
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object. More...
 
bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object. More...
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type. More...
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance. More...
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const noexcept
 Creates a shallow copy of the current object. More...
 
virtual xtd::ustring to_string () const noexcept
 Returns a sxd::ustring that represents the current object. More...
 
- Static Public Member Functions inherited from xtd::object
static bool equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are considered equal. More...
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance. More...
 

Constructor & Destructor Documentation

◆ network_credential() [1/5]

xtd::net::network_credential::network_credential ( )
default

Initializes a new instance of the xtd::net::network_credential class.

◆ network_credential() [2/5]

xtd::net::network_credential::network_credential ( const xtd::ustring user_name,
const xtd::security::secure_string password 
)

Initializes a new instance of the xtd::net::network_credential class with the specified user name and password.

◆ network_credential() [3/5]

xtd::net::network_credential::network_credential ( const xtd::ustring user_name,
const xtd::ustring password 
)

Initializes a new instance of the xtd::net::network_credential class with the specified user name and password.

◆ network_credential() [4/5]

xtd::net::network_credential::network_credential ( const xtd::ustring user_name,
const xtd::security::secure_string password,
const xtd::ustring domain 
)

Initializes a new instance of the xtd::net::network_credential class with the specified user name, password and domain.

◆ network_credential() [5/5]

xtd::net::network_credential::network_credential ( const xtd::ustring user_name,
const xtd::ustring password,
const xtd::ustring domain 
)

Initializes a new instance of the xtd::net::network_credential class with the specified user name, password and domain.

Member Function Documentation

◆ domain() [1/2]

const xtd::ustring& xtd::net::network_credential::domain ( ) const
noexcept

Gets the domain or computer name that verifies the credentials.

Returns
The name of the domain associated with the credentials.
Remarks
The xtd::net::network_credential::domain property specifies the domain or realm to which the user name belongs. Typically, this is the host computer name where the application runs or the user domain for the currently logged in user.

◆ domain() [2/2]

network_credential& xtd::net::network_credential::domain ( const xtd::ustring value)
noexcept

Sets the domain or computer name that verifies the credentials.

Parameters
valueThe name of the domain associated with the credentials.
Remarks
The xtd::net::network_credential::domain property specifies the domain or realm to which the user name belongs. Typically, this is the host computer name where the application runs or the user domain for the currently logged in user.

◆ password() [1/2]

xtd::ustring xtd::net::network_credential::password ( ) const
noexcept

Gets the password for the user name associated with the credentials.

Returns
The password associated with the credentials. If this xtd::net::network_credential instance was initialized with the password parameter set to empty (""), then the xtd::net::network_credential::password property will return an empty string.

◆ password() [2/2]

network_credential& xtd::net::network_credential::password ( const xtd::ustring value)
noexcept

Sets the password for the user name associated with the credentials.

Parameters
valueThe password associated with the credentials. If this xtd::net::network_credential instance was initialized with the password parameter set to empty (""), then the xtd::net::network_credential::password property will return an empty string.

◆ secure_password() [1/2]

const xtd::security::secure_string& xtd::net::network_credential::secure_password ( ) const
noexcept

Gets the password as a xtd::security::secure_string instance.

Returns
The password for the user name associated with the credentials.

◆ secure_password() [2/2]

network_credential& xtd::net::network_credential::secure_password ( const xtd::security::secure_string value)
noexcept

Sets the password as a xtd::security::secure_string instance.

Parameters
valueThe password for the user name associated with the credentials.

◆ user_name() [1/2]

const xtd::ustring& xtd::net::network_credential::user_name ( ) const
noexcept

Gets the user name associated with the credentials.

Returns
The user name associated with the credentials.

◆ user_name() [2/2]

network_credential& xtd::net::network_credential::user_name ( const xtd::ustring value)
noexcept

Sets the user name associated with the credentials.

Parameters
valueThe user name associated with the credentials.

The documentation for this class was generated from the following file: