10Duke Scale C++ Client
Loading...
Searching...
No Matches
AccessTokenRequestAuthenticator.h
1#ifndef TENDUKE_OAUTH_ACCESSTOKENREQUESTAUTHENTICATOR_H
2#define TENDUKE_OAUTH_ACCESSTOKENREQUESTAUTHENTICATOR_H
3
4#include "http/HTTPRequestAuthenticator.h"
5
6#include <memory>
7
8namespace tenduke { namespace oauth {
9
14{
15public:
20 explicit AccessTokenRequestAuthenticator(const std::string& accessToken);
21
27 static std::shared_ptr<tenduke::oauth::AccessTokenRequestAuthenticator> createShared(const std::string &accessToken);
28
29public:
35 std::multimap<std::string, std::string> authenticate(const http::HTTPRequest &request) const override;
36
37private:
38 std::multimap<std::string, std::string> headers;
39};
40
41}}
42
43
44#endif //TENDUKE_OAUTH_ACCESSTOKENREQUESTAUTHENTICATOR_H
This is a service, that can be added to tenduke::http::HTTPRequest to add authentication information ...
Definition HTTPRequestAuthenticator.h:21
HTTP-request, which contains all necessary details to construct the request.
Definition HTTPRequest.h:22
A tenduke::http::HTTPRequestAuthenticator, which uses fixed access token to authenticate HTTP-request...
Definition AccessTokenRequestAuthenticator.h:14
static std::shared_ptr< tenduke::oauth::AccessTokenRequestAuthenticator > createShared(const std::string &accessToken)
Helper to create a shared instance.
Definition AccessTokenRequestAuthenticator.cpp:20
std::multimap< std::string, std::string > authenticate(const http::HTTPRequest &request) const override
Generates headers to authenticate the rquest.
Definition AccessTokenRequestAuthenticator.cpp:13
OAuth services.
Definition AccessTokenRequestAuthenticator.h:8
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7