Loading...
Searching...
No Matches
users_manager.h
1/*
2* <one line to give the program's name and a brief idea of what it does.>
3* Copyright (C) 2021 <copyright holder> <email>
4*
5* This program is free software: you can redistribute it and/or modify
6* it under the terms of the GNU General Public License as published by
7* the Free Software Foundation, either version 3 of the License, or
8* (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19
20#ifndef USERS_MANAGER
21#define USERS_MANAGER
22
23
24#include <string>
25
26#include "Poco/Tuple.h"
27
28#include "functions/action.h"
29#include "security/user.h"
30#include "tools/output_logger.h"
31#include "query/database_manager.h"
32
33
34namespace NAF
35{
36 namespace Security
37 {
38 class UsersManager;
39 }
40}
41
42
44{
45 public:
47
48 User& get_current_user()
49 {
50 auto& var = current_user_;
51 return var;
52 }
53 Functions::Action::Ptr get_action()
54 {
55 auto& var = action_;
56 return var;
57 }
59 {
60 auto& var = credentials_;
61 return var;
62 }
63
64 bool AuthenticateUser_();
65
66 private:
67 User current_user_;
68 Functions::Action::Ptr action_;
70};
71
72
73#endif // USERS_MANAGER
Definition user.h:37
Definition users_manager.h:44
Definition database_manager.h:51