41 LOG(
ERROR) <<
"WsAuthenticator::authentify() : Could not authentify " << m_uid <<
" : " << ip;
44 LOG(
INFO) <<
"WsAuthenticator::authentify() : Authentication success for " << m_uid <<
" : " << ip;
51 return m_auth->getUid();
58 return m_auth->getFirstName();
65 return m_auth->getSurname();
72 return m_auth->getEmail();
79 return m_auth->getUserGroups();
87 return m_auth->getAllGroups();
92 LOG(
DEBUG) <<
"WsAuthenticator :: Loading auth module";
96 void* hndl = dlopen(libName.c_str(), RTLD_LAZY);
98 LOG(
ERROR) <<
"WsAuthenticator::loadModule() : load ERROR " << dlerror();
101 LOG(
DEBUG) <<
"WsAuthenticator :: Building module";
105 LOG(
DEBUG) <<
"WsAuthenticator :: Done loading";
std::string getUid()
return the user uid WsAuthenticator::authentify must be called before
std::string getSurname()
return the user surname WsAuthenticator::authentify must be called before
~WsAuthenticator()
Destructor.
WsAbstractAuth *(* pf_wsAuthMod)()
std::string getEmail()
return the user email WsAuthenticator::authentify must be called before
WsAuthenticator()
Constructor.
int loadModule()
loads the module and casts it as WsAbstractAuth object
std::set< std::string > getUserGroups()
return the user groups WsAuthenticator::authentify must be called before
std::set< std::string > getAllGroups()
return all the possible groups WsAuthenticator::authentify must be called before
std::string get(const std::string §ion, const std::string &id, const std::string &def)
static WsGlobalProperties * instance()
int authentify(const std::string &uid, const std::string &pass="", const std::string &ip="")
authentify the user.
std::string getFirstName()
return the user name WsAuthenticator::authentify must be called before