userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
nonce_cache_settings_component.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/server/handlers/auth/digest/nonce_cache_settings_component.hpp
4
/// @brief @copybrief server::handlers::auth::digest::NonceCacheSettingsComponent
5
6
#
include
<
cstddef
>
7
#
include
<
optional
>
8
#
include
<
string_view
>
9
10
#
include
<
userver
/
components
/
component_base
.
hpp
>
11
#
include
<
userver
/
dynamic_config
/
source
.
hpp
>
12
#
include
<
userver
/
server
/
handlers
/
auth
/
digest
/
auth_checker_settings_component
.
hpp
>
13
14
#
include
"auth_checker_settings.hpp"
15
16
USERVER_NAMESPACE_BEGIN
17
18
namespace
server::
handlers
::auth::digest {
19
20
struct
NonceCacheSettings
{
21
std::size_t ways{};
22
std::size_t way_size{};
23
};
24
25
// clang-format off
26
27
/// @brief Component that loads nonce cache settings from a static_config.yaml
28
///
29
/// ## Static options of server::handlers::auth::digest::NonceCacheSettingsComponent :
30
/// @include{doc} scripts/docs/en/components_schema/core/src/server/handlers/auth/digest/nonce_cache_settings_component.md
31
///
32
/// Options inherited from @ref server::handlers::auth::digest::AuthCheckerSettingsComponent :
33
/// @include{doc} scripts/docs/en/components_schema/core/src/server/handlers/auth/digest/auth_checker_settings_component.md
34
///
35
/// Options inherited from @ref components::ComponentBase :
36
/// @include{doc} scripts/docs/en/components_schema/core/src/components/impl/component_base.md
37
38
// clang-format on
39
40
class
NonceCacheSettingsComponent
final
:
public
AuthCheckerSettingsComponent
{
41
public
:
42
/// @ingroup userver_component_names
43
/// @brief The default name of @ref server::handlers::auth::digest::NonceCacheSettingsComponent
44
static
constexpr
std::string_view
kName
=
"nonce-cache-settings"
;
45
46
NonceCacheSettingsComponent(
const
components
::ComponentConfig& config,
const
components
::ComponentContext& context);
47
48
~NonceCacheSettingsComponent()
final
;
49
50
const
NonceCacheSettings
& GetSettings()
const
;
51
52
static
yaml_config::Schema GetStaticConfigSchema();
53
54
private
:
55
NonceCacheSettings
settings_;
56
};
57
58
}
// namespace server::handlers::auth::digest
59
60
template
<>
61
inline
constexpr
bool
components
::kHasValidate<server::handlers::auth::digest::NonceCacheSettingsComponent> =
true
;
62
63
USERVER_NAMESPACE_END
userver
server
handlers
auth
digest
nonce_cache_settings_component.hpp
Generated on
for userver by
Doxygen
1.17.0