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