userver: userver/s3api/authenticators/interface.hpp Source File
Loading...
Searching...
No Matches
interface.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/s3api/authenticators/interface.hpp
4/// @brief @copybrief s3api::authenticators::Authenticator
5
6#include <memory>
7#include <string>
8#include <unordered_map>
9
10USERVER_NAMESPACE_BEGIN
11
12namespace s3api {
13
14struct Request;
15
16namespace authenticators {
17
18/// @ingroup userver_base_classes
19///
20/// @brief Base class for all authenticators - classes that sign the request with auth data
22 virtual std::unordered_map<std::string, std::string> Auth(const Request& request) const = 0;
23 virtual std::unordered_map<std::string, std::string> Sign(const Request& request, time_t expires) const = 0;
24 virtual ~Authenticator() = default;
25};
26
27using AuthenticatorPtr = std::shared_ptr<Authenticator>;
28
29} // namespace authenticators
30} // namespace s3api
31
32USERVER_NAMESPACE_END