userver
C++ Async Framework
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
#
include
<
string
>
8
9
#
include
<
userver
/
components
/
component_base
.
hpp
>
10
#
include
<
userver
/
yaml_config
/
fwd
.
hpp
>
11
12
namespace
NYdb {
13
class
ICredentialsProviderFactory;
14
}
// namespace NYdb
15
16
USERVER_NAMESPACE_BEGIN
17
18
namespace
ydb {
19
20
// clang-format off
21
22
/// @ingroup userver_components
23
///
24
/// @brief Credentials provider component for creating custom credentials provider factory
25
///
26
/// Allows use custom credentials provider implementation
27
/// Required if `ydb::YdbComponent` comnponent config contains `databases.<dbname>.credentials`
28
///
29
/// see https://ydb.tech/docs/en/concepts/auth
30
31
// clang-format on
32
33
class
CredentialsProviderComponent
:
public
components
::
ComponentBase
{
34
public
:
35
using
components
::
ComponentBase
::ComponentBase;
36
37
/// @brief Create credentials provider factory
38
///
39
/// @param credentials credentials config (`databases.<dbname>.credentials`
40
/// from `ydb::YdbComponent` component config)
41
virtual
std::shared_ptr<NYdb::ICredentialsProviderFactory>
42
CreateCredentialsProviderFactory
(
43
const
yaml_config
::
YamlConfig
& credentials)
const
= 0;
44
};
45
46
}
// namespace ydb
47
48
USERVER_NAMESPACE_END
userver
ydb
credentials.hpp
Generated on Thu Oct 3 2024 13:17:39 for userver by
Doxygen
1.10.0