blob: 160265610c9f1e36837f9202e0e8163817562b98 [file] [log] [blame]
#pragma once
#include <crow/http_request.h>
#include <crow/http_response.h>
namespace crow {
struct User {
};
struct TokenAuthorizationMiddleware {
// TODO(ed) auth_token shouldn't really be passed to the context
// it opens the possibility of exposure by and endpoint.
// instead we should only pass some kind of "user" struct
struct context {
std::string auth_token;
};
std::string auth_token2;
void before_handle(crow::request& req, response& res, context& ctx);
void after_handle(request& req, response& res, context& ctx);
};
}