userver: userver/server/handlers/auth/auth_checker_settings_component.hpp Source File
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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/loggable_component_base.hpp>
7#include <userver/storages/secdist/component.hpp>
8
10
11USERVER_NAMESPACE_BEGIN
12
13namespace components {
14
15// clang-format off
16
17/// @ingroup userver_components
18///
19/// @brief Component that loads auth configuration settings from a
20/// components::Secdist component if the latter was registered in
21/// components::ComponentList.
22///
23/// The component does **not** have any options for service config.
24
25// clang-format on
26
27class AuthCheckerSettings final : public LoggableComponentBase {
28 public:
29 AuthCheckerSettings(const ComponentConfig&, const ComponentContext&);
30
31 /// @ingroup userver_component_names
32 /// @brief The default name of components::AuthCheckerSettings
33 static constexpr std::string_view kName = "auth-checker-settings";
34
35 const server::handlers::auth::AuthCheckerSettings& Get() const {
36 return settings_;
37 }
38
39 static yaml_config::Schema GetStaticConfigSchema();
40
41 private:
42 server::handlers::auth::AuthCheckerSettings settings_;
43};
44
45template <>
46inline constexpr bool kHasValidate<AuthCheckerSettings> = true;
47
48template <>
49inline constexpr auto kConfigFileMode<AuthCheckerSettings> =
51
52} // namespace components
53
54USERVER_NAMESPACE_END