xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Public Member Functions | List of all members
xtd::net::network_credential Class Reference

#include <network_credential.h>

Definition

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

Namespace
xtd::net
Library
xtd.core

Public Member Functions

 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...
 
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...
 
- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object. More...
 
virtual 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...
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const
 Gets the type of the current instance. More...
 
virtual xtd::ustring to_string () const noexcept
 Returns a std::string that represents the current object. More...
 

Additional Inherited Members

- 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::dmain 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::dmain 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: