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

Basic authentication module. More...

#include <WsBasicAuth.h>

Inheritance diagram for WsBasicAuth:
Inheritance graph
Collaboration diagram for WsBasicAuth:
Collaboration graph

Public Member Functions

 WsBasicAuth ()
 Constructor. More...
 
int authentify (const std::string &uid, const std::string &pass="", const std::string &ip="")
 authenticate the user this function is a basic function and will authenticate any user and add the group "Guest to his groups" More...
 
std::string getUid ()
 Get the uid of the user. More...
 
std::string getFirstName ()
 Get the first name of the user. More...
 
std::string getSurname ()
 Get the surname of the user. More...
 
std::string getEmail ()
 Get the email of the user. More...
 
std::set< std::string > getUserGroups ()
 get the groups of the user More...
 
std::set< std::string > getAllGroups ()
 get all the groups in the ldap More...
 

Protected Member Functions

bool ipValid (std::string ip)
 return true or false whether the ip is valid (ie match the mask in the configuration file More...
 

Private Attributes

std::string m_uid
 
std::string m_name
 
std::string m_surname
 
std::string m_email
 
std::string m_dn
 
std::string m_ip
 
std::set< std::string > m_groups
 
std::set< std::string > m_allGroups
 
WsGlobalPropertiesm_properties
 

Detailed Description

Basic authentication module.

Definition at line 27 of file WsBasicAuth.h.

Constructor & Destructor Documentation

WsBasicAuth::WsBasicAuth ( )

Constructor.

Definition at line 31 of file WsBasicAuth.cpp.

Here is the call graph for this function:

Member Function Documentation

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

authenticate the user this function is a basic function and will authenticate any user and add the group "Guest to his groups"

Parameters
uidthe uid of the user
passthe password of the user
ipthe ip of the user
Returns
SUCCESS or FAILURE

Implements WsAbstractAuth.

Definition at line 37 of file WsBasicAuth.cpp.

Here is the call graph for this function:

set< string > WsBasicAuth::getAllGroups ( )
virtual

get all the groups in the ldap

Reimplemented from WsAbstractAuth.

Definition at line 74 of file WsBasicAuth.cpp.

string WsBasicAuth::getEmail ( )
virtual

Get the email of the user.

Reimplemented from WsAbstractAuth.

Definition at line 64 of file WsBasicAuth.cpp.

string WsBasicAuth::getFirstName ( )
virtual

Get the first name of the user.

Returns
a std::string containing the name

Reimplemented from WsAbstractAuth.

Definition at line 54 of file WsBasicAuth.cpp.

string WsBasicAuth::getSurname ( )
virtual

Get the surname of the user.

Returns
the surname of the user

Reimplemented from WsAbstractAuth.

Definition at line 59 of file WsBasicAuth.cpp.

string WsBasicAuth::getUid ( )
virtual

Get the uid of the user.

Returns
a std::string containing the uid

Implements WsAbstractAuth.

Definition at line 49 of file WsBasicAuth.cpp.

set< string > WsBasicAuth::getUserGroups ( )
virtual

get the groups of the user

Reimplemented from WsAbstractAuth.

Definition at line 69 of file WsBasicAuth.cpp.

bool WsBasicAuth::ipValid ( std::string  ip)
protected

return true or false whether the ip is valid (ie match the mask in the configuration file

Parameters
ipthe ip

Definition at line 79 of file WsBasicAuth.cpp.

Here is the call graph for this function:

Member Data Documentation

std::set<std::string> WsBasicAuth::m_allGroups
private

Definition at line 98 of file WsBasicAuth.h.

std::string WsBasicAuth::m_dn
private

Definition at line 95 of file WsBasicAuth.h.

std::string WsBasicAuth::m_email
private

Definition at line 94 of file WsBasicAuth.h.

std::set<std::string> WsBasicAuth::m_groups
private

Definition at line 97 of file WsBasicAuth.h.

std::string WsBasicAuth::m_ip
private

Definition at line 96 of file WsBasicAuth.h.

std::string WsBasicAuth::m_name
private

Definition at line 92 of file WsBasicAuth.h.

WsGlobalProperties* WsBasicAuth::m_properties
private

Definition at line 99 of file WsBasicAuth.h.

std::string WsBasicAuth::m_surname
private

Definition at line 93 of file WsBasicAuth.h.

std::string WsBasicAuth::m_uid
private

Definition at line 91 of file WsBasicAuth.h.


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