1 #include "RequestAuthenticationBase.h"
6 namespace Odb::Lib::App
8 RequestAuthenticationBase::RequestAuthenticationBase(
bool disableAuthentication)
9 : m_disableAuthentication(disableAuthentication)
13 crow::response RequestAuthenticationBase::AuthenticateRequest(
const crow::request& req)
16 if (IsDebug() && IsLocal())
19 return crow::response(200,
"Authorized");
21 else if (m_disableAuthentication)
24 return crow::response(200,
"Authorized");
28 return crow::response(401,
"Unauthorized");