Add new services
password_hasher auth_services
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <drogon/HttpController.h>
|
||||
#include <functional>
|
||||
|
||||
class AuthService;
|
||||
|
||||
class AuthController {
|
||||
public:
|
||||
explicit AuthController(AuthService &auth_service);
|
||||
|
||||
void register_user(const drogon::HttpRequestPtr &req,
|
||||
std::function<void(const drogon::HttpResponsePtr &)> &&callback) const;
|
||||
|
||||
private:
|
||||
bool isValidAuthJson(const std::shared_ptr<Json::Value> &req) const;
|
||||
|
||||
private:
|
||||
AuthService &authService_;
|
||||
};
|
||||
Reference in New Issue
Block a user