blob: 61c8385fb405daf9d04a9f7c46ad640f412760de [file] [log] [blame]
Ed Tanousf9273472017-02-28 16:05:13 -08001#pragma once
2
3#include <crow/http_request.h>
4#include <crow/http_response.h>
5
Ed Tanous99923322017-03-03 14:21:24 -08006namespace crow {
7struct TokenAuthorizationMiddleware {
8 struct context {
Ed Tanousc4771fb2017-03-13 13:39:49 -07009 std::string auth_token;
Ed Tanous99923322017-03-03 14:21:24 -080010 };
Ed Tanousf9273472017-02-28 16:05:13 -080011
Ed Tanousc4771fb2017-03-13 13:39:49 -070012 std::string auth_token2;
13
Ed Tanous99923322017-03-03 14:21:24 -080014 void before_handle(crow::request& req, response& res, context& ctx);
Ed Tanousf9273472017-02-28 16:05:13 -080015
Ed Tanous99923322017-03-03 14:21:24 -080016 void after_handle(request& req, response& res, context& ctx);
17};
Ed Tanousf9273472017-02-28 16:05:13 -080018}