userver: userver/server/handlers/auth/auth_checker_settings_component.hpp Source File
Loading...
Searching...
No Matches
auth_checker_settings_component.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/server/handlers/auth/auth_checker_settings_component.hpp
4/// @brief @copybrief components::AuthCheckerSettings
5
6#include <userver/components/component_base.hpp>
7#include <userver/storages/secdist/component.hpp>
8
10
11USERVER_NAMESPACE_BEGIN
12
13namespace components {
14
15/// @ingroup userver_components
16///
17/// @brief Component that loads auth configuration settings from a
18/// components::Secdist component if the latter was registered in
19/// components::ComponentList.
20///
21/// The component does **not** have any options for service config.
22class AuthCheckerSettings final : public ComponentBase {
23public:
24 AuthCheckerSettings(const ComponentConfig&, const ComponentContext&);
25
26 /// @ingroup userver_component_names
27 /// @brief The default name of components::AuthCheckerSettings
28 static constexpr std::string_view kName = "auth-checker-settings";
29
30 const server::handlers::auth::AuthCheckerSettings& Get() const { return settings_; }
31
32 static yaml_config::Schema GetStaticConfigSchema();
33
34private:
35 server::handlers::auth::AuthCheckerSettings settings_;
36};
37
38template <>
39inline constexpr bool kHasValidate<AuthCheckerSettings> = true;
40
41template <>
42inline constexpr auto kConfigFileMode<AuthCheckerSettings> = ConfigFileMode::kNotRequired;
43
44} // namespace components
45
46USERVER_NAMESPACE_END