userver: userver/s3api/authenticators/utils.hpp Source File
Loading...
Searching...
No Matches
utils.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/s3api/authenticators/utils.hpp
4/// @brief Helpers for writing your own authenticators
5
6#include <string>
7
8#include <userver/s3api/models/request.hpp>
9#include <userver/s3api/models/secret.hpp>
10
11USERVER_NAMESPACE_BEGIN
12
13namespace s3api::authenticators {
14
15std::string MakeHeaderDate();
16std::string MakeHeaderContentMd5(const std::string& data);
17std::string
18MakeHeaderAuthorization(const std::string& string_to_sign, const std::string& access_key, const Secret& secret_key);
19std::string MakeSignature(const std::string& string_to_sign, const Secret& secret_key);
20
21std::string MakeStringToSign(
22 const Request& request,
23 const std::string& header_date,
24 const std::optional<std::string>& header_content_md5
25);
26
27} // namespace s3api::authenticators
28
29USERVER_NAMESPACE_END