|
@@ -1,5 +1,6 @@
|
|
#include "../include/Server.h"
|
|
#include "../include/Server.h"
|
|
#include "../include/base64.h"
|
|
#include "../include/base64.h"
|
|
|
|
+#include "../include/user_manager.h"
|
|
|
|
|
|
#include <iostream>
|
|
#include <iostream>
|
|
|
|
|
|
@@ -93,8 +94,9 @@ void con_handler::handle_read_login(const boost::system::error_code &err,
|
|
|
|
|
|
// user credentials
|
|
// user credentials
|
|
// TODO check user credentials!!!
|
|
// TODO check user credentials!!!
|
|
- if (root["user"].asString().compare("user") == 0 &&
|
|
|
|
- root["pass"].asString().compare("pass") == 0) {
|
|
|
|
|
|
+ // if (root["user"].asString().compare("user") == 0 &&
|
|
|
|
+ // root["pass"].asString().compare("pass") == 0) {
|
|
|
|
+ if (UserManager::isAllowed(root["user"].asString(), root["pass"].asString())) {
|
|
answer["accept"] = true;
|
|
answer["accept"] = true;
|
|
|
|
|
|
// read next data
|
|
// read next data
|