diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-08 22:08:14 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-08 22:08:14 -0500 |
commit | a6c6d0a42920fb9332f810e949fdf5fe20262f22 (patch) | |
tree | fd0bf555c53b74fb7ca141738a1428a868050b79 /hscript/user.hh | |
parent | a621e6b86adfe8278d2e9c110eb8ef54e58c6abe (diff) | |
download | horizon-a6c6d0a42920fb9332f810e949fdf5fe20262f22.tar.gz horizon-a6c6d0a42920fb9332f810e949fdf5fe20262f22.tar.bz2 horizon-a6c6d0a42920fb9332f810e949fdf5fe20262f22.tar.xz horizon-a6c6d0a42920fb9332f810e949fdf5fe20262f22.zip |
hscript: Use StringKey for Hostname (+ others), implement RootPassphrase
Diffstat (limited to 'hscript/user.hh')
-rw-r--r-- | hscript/user.hh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/hscript/user.hh b/hscript/user.hh index 39a3eea..9bb1bd7 100644 --- a/hscript/user.hh +++ b/hscript/user.hh @@ -18,16 +18,24 @@ namespace Horizon { namespace Keys { -class RootPassphrase : public Key { +class RootPassphrase : public StringKey { +private: + RootPassphrase(int _line, const std::string my_pw) : + StringKey(_line, my_pw) {} +public: + static Key *parseFromData(const std::string data, int lineno, int *errors, + int *warnings); + bool validate() const override; + bool execute() const override; }; -class Username : public Key { +class Username : public StringKey { }; class UserAlias : public Key { }; -class UserPassphrase : public Key { +class UserPassphrase : public StringKey { }; class UserIcon : public Key { |