userver: userver/server/handlers/auth/auth_checker_settings.hpp Source File
Loading...
Searching...
No Matches
auth_checker_settings.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/server/handlers/auth/auth_checker_settings.hpp
4/// @brief @copybrief server::handlers::auth::AuthCheckerSettings
5
6#include <optional>
7
8#include <userver/formats/json/value.hpp>
9
11
12USERVER_NAMESPACE_BEGIN
13
14namespace server::handlers::auth {
15
16/// @brief Authentication checker settings parsed from JSON
17class AuthCheckerSettings final {
18public:
19 explicit AuthCheckerSettings(const formats::json::Value& doc);
20
21 const std::optional<ApiKeysMap>& GetApiKeysMap() const { return apikeys_map_; }
22
23private:
24 void ParseApikeys(const formats::json::Value& apikeys_map);
25
26 std::optional<ApiKeysMap> apikeys_map_;
27};
28
29} // namespace server::handlers::auth
30
31USERVER_NAMESPACE_END