Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
WsAuthenticator Class Reference

Loads Authentification module and acts as an interface. More...

#include <WsAuthenticator.h>

Collaboration diagram for WsAuthenticator:
Collaboration graph

Public Member Functions

 WsAuthenticator ()
 Constructor. More...
 
 ~WsAuthenticator ()
 Destructor. More...
 
int authentify (const std::string &uid, const std::string &pass="", const std::string &ip="")
 authentify the user. More...
 
std::string getUid ()
 return the user uid WsAuthenticator::authentify must be called before More...
 
std::string getFirstName ()
 return the user name WsAuthenticator::authentify must be called before More...
 
std::string getSurname ()
 return the user surname WsAuthenticator::authentify must be called before More...
 
std::string getEmail ()
 return the user email WsAuthenticator::authentify must be called before More...
 
std::set< std::string > getUserGroups ()
 return the user groups WsAuthenticator::authentify must be called before More...
 
std::set< std::string > getAllGroups ()
 return all the possible groups WsAuthenticator::authentify must be called before More...
 

Private Member Functions

int loadModule ()
 loads the module and casts it as WsAbstractAuth object More...
 

Private Attributes

WsAbstractAuthm_auth
 
std::string m_uid
 
std::string m_pass
 
std::string m_ip
 

Detailed Description

Loads Authentification module and acts as an interface.

The module name must be 'libWsModAuth.so'

Definition at line 26 of file WsAuthenticator.h.

Constructor & Destructor Documentation

WsAuthenticator::WsAuthenticator ( )

Constructor.

Definition at line 23 of file WsAuthenticator.cpp.

WsAuthenticator::~WsAuthenticator ( )

Destructor.

Definition at line 27 of file WsAuthenticator.cpp.

Member Function Documentation

int WsAuthenticator::authentify ( const std::string &  uid,
const std::string &  pass = "",
const std::string &  ip = "" 
)

authentify the user.

Parameters
uidthe user id
passthe password
Returns
SUCCESS if user is authentified, FAILURE otherwise If the user is authentifed, his personnal info are retrieved

Definition at line 33 of file WsAuthenticator.cpp.

Here is the caller graph for this function:

set< string > WsAuthenticator::getAllGroups ( )

return all the possible groups WsAuthenticator::authentify must be called before

Definition at line 83 of file WsAuthenticator.cpp.

Here is the caller graph for this function:

string WsAuthenticator::getEmail ( )

return the user email WsAuthenticator::authentify must be called before

Definition at line 69 of file WsAuthenticator.cpp.

Here is the caller graph for this function:

string WsAuthenticator::getFirstName ( )

return the user name WsAuthenticator::authentify must be called before

Definition at line 55 of file WsAuthenticator.cpp.

Here is the caller graph for this function:

string WsAuthenticator::getSurname ( )

return the user surname WsAuthenticator::authentify must be called before

Definition at line 62 of file WsAuthenticator.cpp.

Here is the caller graph for this function:

string WsAuthenticator::getUid ( )

return the user uid WsAuthenticator::authentify must be called before

Definition at line 48 of file WsAuthenticator.cpp.

Here is the caller graph for this function:

set< string > WsAuthenticator::getUserGroups ( )

return the user groups WsAuthenticator::authentify must be called before

Definition at line 76 of file WsAuthenticator.cpp.

Here is the caller graph for this function:

int WsAuthenticator::loadModule ( )
private

loads the module and casts it as WsAbstractAuth object

Returns
SUCCESS or FAILURE

Definition at line 90 of file WsAuthenticator.cpp.

Here is the call graph for this function:

Member Data Documentation

WsAbstractAuth* WsAuthenticator::m_auth
private

Definition at line 92 of file WsAuthenticator.h.

std::string WsAuthenticator::m_ip
private

Definition at line 95 of file WsAuthenticator.h.

std::string WsAuthenticator::m_pass
private

Definition at line 94 of file WsAuthenticator.h.

std::string WsAuthenticator::m_uid
private

Definition at line 93 of file WsAuthenticator.h.


The documentation for this class was generated from the following files: