userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
access_key.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/s3api/authenticators/access_key.hpp
4
/// @brief Authenticator for using `access_key` and `secret_key` for authentication
5
6
#
include
<
string
>
7
#
include
<
unordered_map
>
8
9
#
include
<
userver
/
s3api
/
authenticators
/
interface
.
hpp
>
10
#
include
<
userver
/
s3api
/
models
/
fwd
.
hpp
>
11
12
USERVER_NAMESPACE_BEGIN
13
14
namespace
s3api::
authenticators
{
15
16
class
AccessKey
:
public
Authenticator
{
17
public
:
18
AccessKey(std::string access_key, Secret secret_key)
19
: access_key_{std::move(access_key)},
20
secret_key_{std::move(secret_key)}
21
{}
22
std::unordered_map<std::string, std::string> Auth(
const
Request
& request)
const
override
;
23
std::unordered_map<std::string, std::string> Sign(
const
Request
& request, time_t expires)
const
override
;
24
25
private
:
26
std::string access_key_;
27
Secret secret_key_;
28
};
29
30
}
// namespace s3api::authenticators
31
32
USERVER_NAMESPACE_END
userver
s3api
authenticators
access_key.hpp
Generated on
for userver by
Doxygen
1.17.0