libnick 2025.9.1
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
credential.h
Go to the documentation of this file.
1
22
23#ifndef CREDENTIAL_H
24#define CREDENTIAL_H
25
26#include <string>
27
29{
34 {
35 public:
39 Credential() = default;
47 Credential(const std::string& name, const std::string& uri, const std::string& username, const std::string& password) noexcept;
52 const std::string& getName() const noexcept;
57 void setName(const std::string& name) noexcept;
62 const std::string& getUri() const noexcept;
67 void setUri(const std::string& uri) noexcept;
72 const std::string& getUsername() const noexcept;
77 void setUsername(const std::string& username) noexcept;
82 const std::string& getPassword() const noexcept;
87 void setPassword(const std::string& password) noexcept;
93 std::strong_ordering operator<=>(const Credential&) const noexcept = default;
94
95 private:
96 std::string m_name;
97 std::string m_uri;
98 std::string m_username;
99 std::string m_password;
100 };
101}
102
103#endif //CREDENTIAL_H
void setPassword(const std::string &password) noexcept
Sets the password of the credential.
void setUri(const std::string &uri) noexcept
Sets the uri of the credential (can also be used as a comment for the Credential)
void setName(const std::string &name) noexcept
Sets the name of the credential.
const std::string & getUri() const noexcept
Gets the uri of the credential (can also be used as a comment for the Credential)
const std::string & getPassword() const noexcept
Gets the password of the credential.
Credential(const std::string &name, const std::string &uri, const std::string &username, const std::string &password) noexcept
Constructs a credential.
const std::string & getUsername() const noexcept
Gets the username of the credential.
Credential()=default
Constructs a credential.
void setUsername(const std::string &username) noexcept
Sets the username of the credential.
const std::string & getName() const noexcept
Gets the name of the credential.
Definition credential.h:29