xtd 0.2.0
Loading...
Searching...
No Matches
xtd::net::network_credential Class Reference
Inheritance diagram for xtd::net::network_credential:
xtd::object

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

Public Constructors

 network_credential ()=default
 Initializes a new instance of the xtd::net::network_credential class.
 
 network_credential (const xtd::string &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 (const xtd::string &user_name, const xtd::string &password)
 Initializes a new instance of the xtd::net::network_credential class with the specified user name and password.
 
 network_credential (const xtd::string &user_name, const xtd::security::secure_string &password, const xtd::string &domain)
 Initializes a new instance of the xtd::net::network_credential class with the specified user name, password and domain.
 
 network_credential (const xtd::string &user_name, const xtd::string &password, const xtd::string &domain)
 Initializes a new instance of the xtd::net::network_credential class with the specified user name, password and domain.
 

Public Properties

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

Additional Inherited Members

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

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::string 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::string user_name,
const xtd::string 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::string user_name,
const xtd::security::secure_string password,
const xtd::string 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::string user_name,
const xtd::string password,
const xtd::string 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::string & 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::string 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::string 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::string 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::string & 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::string 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: