diff options
Diffstat (limited to 'include/odhtdb/LocalUser.hpp')
-rw-r--r-- | include/odhtdb/LocalUser.hpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/odhtdb/LocalUser.hpp b/include/odhtdb/LocalUser.hpp index d60cb38..0312a38 100644 --- a/include/odhtdb/LocalUser.hpp +++ b/include/odhtdb/LocalUser.hpp @@ -1,15 +1,16 @@ #pragma once #include "User.hpp" +#include "types.hpp" namespace odhtdb { class LocalUser : public User { public: - static LocalUser* create(const Signature::KeyPair &keyPair, const std::string &name, Group *group) + static LocalUser* create(const Signature::KeyPair &keyPair, const std::string &name, Group *group, const std::string &plainPassword) { - return new LocalUser(keyPair, name, group); + return new LocalUser(keyPair, name, group, plainPassword); } const Signature::PublicKey& getPublicKey() const override @@ -21,9 +22,15 @@ namespace odhtdb { return keyPair.getPrivateKey(); } + + const std::string& getPlainPassword() const + { + return plainPassword; + } private: - LocalUser(const Signature::KeyPair &_keyPair, const std::string &name, Group *group) : User(name, group), keyPair(_keyPair) {} + LocalUser(const Signature::KeyPair &_keyPair, const std::string &name, Group *group, const std::string &plainPassword); private: Signature::KeyPair keyPair; + std::string plainPassword; }; } |