15 #ifndef WS_USER_SESSION_H__
16 #define WS_USER_SESSION__H__
36 WsUserSession(
const std::string& uid,
const std::string& pass =
"",
const std::string& ip =
"");
63 void setGroups(
const std::set<std::string>& groups);
69 void setName(
const std::string& name);
81 void setEmail(
const std::string& email);
90 bool isValidSession(
const std::string& uid,
const std::string& pass,
const std::string& ip);
Reprensents a User session.
void setSurname(const std::string &surname)
set the surname of the user
void setName(const std::string &name)
set the name of the user
const std::string & getName()
void setGroups(const std::set< std::string > &groups)
sets the groups of a user
std::set< std::string > m_groups
WsUserSession(const std::string &uid, const std::string &pass="", const std::string &ip="")
Constructor.
const std::string & getEmail()
void setEmail(const std::string &email)
set the email of the user
const std::set< std::string > & getGroups()
get the groups belonging to the user
const std::string & getSurname()
long getNowTimestamp()
returns the time.now()
bool isValidSession(const std::string &uid, const std::string &pass, const std::string &ip)
returns true or false whether the session is valid