userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
credentials.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/ydb/credentials.hpp
4
/// @brief @copybrief ydb::CredentialsProviderComponent
5
6
#
include
<
memory
>
7
8
#
include
<
userver
/
components
/
component_base
.
hpp
>
9
#
include
<
userver
/
yaml_config
/
fwd
.
hpp
>
10
11
#
include
<
ydb
-
cpp
-
sdk
/
client
/
types
/
fwd
.
h
>
12
13
USERVER_NAMESPACE_BEGIN
14
15
namespace
ydb {
16
17
/// @ingroup userver_components
18
///
19
/// @brief Credentials provider component for creating custom credentials provider factory
20
///
21
/// Allows use custom credentials provider implementation
22
/// Required if `ydb::YdbComponent` comnponent config contains `databases.<dbname>.credentials`
23
///
24
/// see https://ydb.tech/docs/en/concepts/auth
25
class
CredentialsProviderComponent
:
public
components
::
ComponentBase
{
26
public
:
27
using
components
::
ComponentBase
::ComponentBase;
28
29
/// @brief Create credentials provider factory
30
///
31
/// @param credentials credentials config (`databases.<dbname>.credentials`
32
/// from `ydb::YdbComponent` component config)
33
virtual
std::shared_ptr<NYdb::ICredentialsProviderFactory>
CreateCredentialsProviderFactory
(
34
const
yaml_config::
YamlConfig
& credentials
35
)
const
= 0;
36
};
37
38
}
// namespace ydb
39
40
USERVER_NAMESPACE_END
userver
ydb
credentials.hpp
Generated on
for userver by
Doxygen
1.17.0