21#if !defined(ms_security_user_INCLUDED_)
22#define ms_security_user_INCLUDED_
33namespace matrix_science {
58 USER_SECURITY_DISABLED = 0x0000,
60 USER_INTEGRA = 0x0002,
61 USER_COMPUTER_NAME = 0x0003,
62 USER_IP_ADDRESS = 0x0004,
63 USER_AGENT_STRING = 0x0005,
73 USERID_SECURITY_DISABLED= 0x0000,
74 USERID_GUEST = 0x0001,
75 USERID_ADMINISTRATOR = 0x0002,
76 USERID_CMDLINE = 0x0003,
77 USERID_DAEMON = 0x0004,
78 USERID_PUBLIC_SEARCHES = 0x0005,
79 USERID_INTEGRA_SYSTEM = 0x0006,
85 const std::string userName,
86 const std::string password,
87 const long passwordExpiry,
88 const std::string fullName,
89 const std::string emailAddress,
90 const usertype userType,
106 usertype getUserType()
const;
109 void setUserType(usertype newVal);
112 std::string getFullName()
const;
115 void setFullName(std::string newVal);
118 std::string getEncryptedPassword()
const;
121 void setEncryptedPassword(std::string newVal);
124 void setPassword(std::string barePassword);
127 bool validatePassword(
const std::string pwd,
int & errorFlag)
const;
130 time_t getPasswordExpiry()
const;
133 void setPasswordExpiry(time_t newVal);
139 void setID(
int newVal);
142 std::string getName()
const;
145 void setName(std::string newVal);
148 bool isAccountEnabled()
const;
151 void setAccountEnabled(
bool newVal);
154 std::string getEmailAddress()
const;
157 void setEmailAddress(std::string newVal);
160 bool hasPasswordExpired()
const;
163 bool saveStringParam(
const std::string name,
const std::string param);
167 bool getStringParam(
const std::string name, std::string & param)
const;
171 std::string getStringParam(
const std::string name)
const;
174 bool clearParam(
const std::string name);
177#ifndef DOXYGEN_SHOULD_SKIP_THIS
178 typedef std::map<std::string, std::string> customParams_t;
179 customParams_t getAllCustomParams()
const {
return params_; }
185 std::string userName_;
186 std::string fullName_;
187 std::string encryptedPassword_;
188 time_t passwordExpiry_;
189 std::string emailAddress_;
190 bool accountEnabled_;
192 customParams_t params_;
194 void copyFrom(
const ms_user * src);
This class will normally only be used by Mascot Security Administration applications.
Definition: ms_security_user.hpp:49
usertype
Definitions for types of user.
Definition: ms_security_user.hpp:57
systemids
Definitions for predefined users.
Definition: ms_security_user.hpp:72