Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WsAbstractAuth.h
Go to the documentation of this file.
1 /*
2  *
3  * Filename: WsAbstractAuth.h
4  *
5  * Description: Abstract class used to authentificate in the application
6  *
7  * Created: 02/10/12 15:33:40
8  *
9  * Author: Benoit Daccache, ben.daccache@gmail.com
10  *
11  */
12 
13 #ifndef WS_ABSTRACT_AUTH_H__
14 #define WS_ABSTRACT_AUTH_H__
15 
16 #include <iostream>
17 #include <set>
18 
27 
28 public:
29 
37  virtual int authentify(const std::string& uid, const std::string& pass = "", const std::string& ip = "") = 0;
38 
42  virtual std::string getUid() = 0;
43 
47  virtual std::string getFirstName();
48 
52  virtual std::string getSurname();
53 
57  virtual std::string getEmail();
58 
62  virtual std::set<std::string> getUserGroups();
63 
67  virtual std::set<std::string> getAllGroups();
68 
69 };
70 
71 #endif
virtual std::string getUid()=0
return the user's id
virtual std::string getFirstName()
return the user's name
virtual std::set< std::string > getAllGroups()
return all the possible groups
virtual std::string getEmail()
return the user's email
virtual std::set< std::string > getUserGroups()
return the groups of the user
virtual int authentify(const std::string &uid, const std::string &pass="", const std::string &ip="")=0
authentify user with uid.
virtual std::string getSurname()
return the user's surname
Abstract class for authentification.