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