userver: userver/server/handlers/auth/digest/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/digest/auth_checker_settings_component.hpp
4/// @brief @copybrief server::handlers::auth::digest::AuthCheckerSettingsComponent
5
6#include <optional>
7#include <string_view>
8
9#include <userver/components/component_base.hpp>
10#include <userver/dynamic_config/source.hpp>
11
13
14USERVER_NAMESPACE_BEGIN
15
16namespace server::handlers::auth::digest {
17
18// clang-format off
19
20/// @brief Component that loads digest auth configuration settings from a static_config.yaml
21///
22/// ## Static options of server::handlers::auth::digest::AuthCheckerSettingsComponent :
23/// @include{doc} scripts/docs/en/components_schema/core/src/server/handlers/auth/digest/auth_checker_settings_component.md
24///
25/// Options inherited from @ref components::ComponentBase :
26/// @include{doc} scripts/docs/en/components_schema/core/src/components/impl/component_base.md
27
28// clang-format on
29
31public:
32 /// @ingroup userver_component_names
33 /// @brief The default name of @ref server::handlers::auth::digest::AuthCheckerSettingsComponent
34 static constexpr std::string_view kName = "auth-digest-checker-settings";
35
36 AuthCheckerSettingsComponent(
37 const components::ComponentConfig& config,
38 const components::ComponentContext& context
39 );
40
41 ~AuthCheckerSettingsComponent() override;
42
43 const AuthCheckerSettings& GetSettings() const;
44
45 static yaml_config::Schema GetStaticConfigSchema();
46
47private:
48 AuthCheckerSettings settings_;
49};
50
51} // namespace server::handlers::auth::digest
52
53template <>
54inline constexpr bool components::kHasValidate<server::handlers::auth::digest::AuthCheckerSettingsComponent> = true;
55
56USERVER_NAMESPACE_END