blob: aef33e35a7369ca661ad86aad19abd61e84fe2c0 [file] [log] [blame]
Ed Tanousf9273472017-02-28 16:05:13 -08001#include "token_authorization_middleware.hpp"
2#include <crow/app.h>
3#include "gtest/gtest.h"
4
Ed Tanousf9273472017-02-28 16:05:13 -08005// Tests that Base64 basic strings work
Ed Tanous99923322017-03-03 14:21:24 -08006TEST(Authentication, TestBasicReject) {
7 /*
8 crow::App<crow::TokenAuthorizationMiddleware> app;
9 crow::request req;
10 crow::response res;
11 app.handle(req, res);
12 ASSERT_EQ(res.code, 400);
Ed Tanousf9273472017-02-28 16:05:13 -080013
14
Ed Tanous99923322017-03-03 14:21:24 -080015 crow::App<crow::TokenAuthorizationMiddleware> app;
16 decltype(app)::server_t server(&app, "127.0.0.1", 45451);
17 CROW_ROUTE(app, "/")([&](const crow::request& req)
18 {
19 app.get_context<NullMiddleware>(req);
20 app.get_context<NullSimpleMiddleware>(req);
21 return "";
22 });
23 */
Ed Tanousf9273472017-02-28 16:05:13 -080024}