userver
C++ Async Framework
Toggle main menu visibility
Documentation
API Groups
Namespaces
Reference
Class List
Class Index
File List
Macros
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
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
};
21
struct
NonceCacheSettings
{
…
};
25
26
// clang-format off
27
28
/// @brief Component that loads nonce cache settings from a static_config.yaml
29
/// ## Static options:
30
///
31
/// Name | Description | Default value
32
/// ------ | --------------------------------------| -------------
33
/// size | max amount of items to store in cache | -
34
/// ways | number of ways for associative cache | -
35
36
// clang-format on
37
38
class
NonceCacheSettingsComponent
final
:
public
AuthCheckerSettingsComponent
{
39
public
:
40
/// @ingroup userver_component_names
41
/// @brief The default name of
42
/// server::handlers::auth::NonceCacheSettingsComponent
43
static
constexpr
std::string_view
kName
=
"nonce-cache-settings"
;
44
45
NonceCacheSettingsComponent(
const
components
::ComponentConfig& config,
const
components
::ComponentContext& context);
46
47
~NonceCacheSettingsComponent()
final
;
48
49
const
NonceCacheSettings
& GetSettings()
const
;
50
51
static
yaml_config
::Schema GetStaticConfigSchema();
52
53
private
:
54
NonceCacheSettings
settings_;
55
};
38
class
NonceCacheSettingsComponent
final
:
public
AuthCheckerSettingsComponent
{
…
};
56
57
}
// namespace server::handlers::auth::digest
58
59
template
<>
60
inline
constexpr
bool
components
::kHasValidate<server::handlers::auth::digest::NonceCacheSettingsComponent> =
true
;
61
62
USERVER_NAMESPACE_END
userver
server
handlers
auth
digest
nonce_cache_settings_component.hpp
Generated on Wed Apr 30 2025 15:53:53 for userver by
Doxygen
1.13.2