OdbDesignLib
OdbDesign ODB++ Parsing Library
 
Loading...
Searching...
No Matches
BasicRequestAuthentication.h
1#pragma once
2
3#include "RequestAuthenticationBase.h"
4#include "../odbdesign_export.h"
5
6namespace Odb::Lib::App
7{
9 {
10 public:
11 BasicRequestAuthentication(bool disableAuthentication);
12
13 // Inherited via RequestAuthenticationBase
14 crow::response AuthenticateRequest(const crow::request& req) override;
15
16 private:
17
18 const inline static char AUTHORIZATION_HEADER_NAME[] = "Authorization";
19
20 crow::response VerifyCredentials(const std::string& username, const std::string& password);
21
22 const inline static char USERNAME_ENV_NAME[] = "ODBDESIGN_SERVER_REQUEST_USERNAME";
23 const inline static char PASSWORD_ENV_NAME[] = "ODBDESIGN_SERVER_REQUEST_PASSWORD";
24
25
26 };
27}