Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 1 | #pragma once |
2 | |||||
3 | #include <crow/http_request.h> | ||||
4 | #include <crow/http_response.h> | ||||
5 | |||||
Ed Tanous | 9992332 | 2017-03-03 14:21:24 -0800 | [diff] [blame] | 6 | namespace crow { |
7 | struct TokenAuthorizationMiddleware { | ||||
8 | struct context { | ||||
Ed Tanous | c4771fb | 2017-03-13 13:39:49 -0700 | [diff] [blame] | 9 | std::string auth_token; |
Ed Tanous | 9992332 | 2017-03-03 14:21:24 -0800 | [diff] [blame] | 10 | }; |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 11 | |
Ed Tanous | c4771fb | 2017-03-13 13:39:49 -0700 | [diff] [blame] | 12 | std::string auth_token2; |
13 | |||||
Ed Tanous | 9992332 | 2017-03-03 14:21:24 -0800 | [diff] [blame] | 14 | void before_handle(crow::request& req, response& res, context& ctx); |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 15 | |
Ed Tanous | 9992332 | 2017-03-03 14:21:24 -0800 | [diff] [blame] | 16 | void after_handle(request& req, response& res, context& ctx); |
17 | }; | ||||
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 18 | } |