xtd - Reference Guide 0.2.0
Go to the documentation of this file.
1 #pragma once
6 #include <vector>
7 #include "../core_export.h"
8 #include "../object.h"
9 #include "../types.h"
10 #include "../ustring.h"
11 #include "../security/secure_string.h"
14 namespace xtd {
16  namespace net {
23  class core_export_ network_credential : public xtd::object {
24  public:
29  network_credential() = default;
31  network_credential(const xtd::ustring& user_name, const xtd::security::secure_string& password);
33  network_credential(const xtd::ustring& user_name, const xtd::ustring& password);
35  network_credential(const xtd::ustring& user_name, const xtd::security::secure_string& password, const xtd::ustring& domain);
37  network_credential(const xtd::ustring& user_name, const xtd::ustring& password, const xtd::ustring& domain);
43  network_credential& operator=(const network_credential&) = default;
44  friend std::ostream& operator <<(std::ostream& os, const network_credential& host_entry) noexcept {return os << host_entry.to_string();}
53  const xtd::ustring& domain() const noexcept;
57  network_credential& domain(const xtd::ustring& value) noexcept;
61  xtd::ustring password() const noexcept;
64  network_credential& password(const xtd::ustring& value) noexcept;
68  const xtd::security::secure_string& secure_password() const noexcept;
71  network_credential& secure_password(const xtd::security::secure_string& value) noexcept;
75  const xtd::ustring& user_name() const noexcept;
78  network_credential& user_name(const xtd::ustring& value) noexcept;
81  private:
82  xtd::ustring user_name_;
84  xtd::ustring domain_;
85  };
86  }
87 }
virtual xtd::ustring to_string() const noexcept
Returns a sxd::ustring that represents the current object.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:50
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:30
Represents text that should be kept confidential, such as by deleting it from computer memory when no...
Definition: secure_string.h:18
Provides credentials for password-based authentication schemes such as basic, digest, NTLM, and Kerberos authentication.
Definition: network_credential.h:23