1#ifndef TENDUKE_OAUTH_BASEOAUTHCLIENT_H
2#define TENDUKE_OAUTH_BASEOAUTHCLIENT_H
4#include "./OAuthClient.h"
5#include "./OAuthConfiguration.h"
7#include "crypto/MessageDigestFactory.h"
8#include "http/HTTPClient.h"
9#include "json/JSONParser.h"
10#include "net/URLParser.h"
11#include "time/Clock.h"
12#include "utl/Base64Encoder.h"
13#include "utl/random/RandomURLSafeString.h"
37 std::shared_ptr<const tenduke::oauth::OAuthConfiguration>
config,
38 std::shared_ptr<const tenduke::http::HTTPClient>
httpClient,
39 std::shared_ptr<const tenduke::json::JSONParser>
jsonParser,
40 std::shared_ptr<tenduke::time::Clock>
clock
51 std::unique_ptr<const tenduke::oauth::OAuthRefreshRequest>
refresh(std::shared_ptr<tenduke::oauth::OAuthState> state)
const override;
55 const std::shared_ptr<const OAuthConfiguration>
config;
57 const std::shared_ptr<const tenduke::http::HTTPClient>
httpClient;
59 const std::shared_ptr<const tenduke::json::JSONParser>
jsonParser;
61 const std::shared_ptr<tenduke::time::Clock>
clock;
Base class for OAuth-clients.
Definition BaseOAuthClient.h:27
const std::shared_ptr< const tenduke::json::JSONParser > jsonParser
For parsing responses.
Definition BaseOAuthClient.h:59
const std::shared_ptr< tenduke::time::Clock > clock
Clock to generate "expires-at" from "expires-in".
Definition BaseOAuthClient.h:61
std::shared_ptr< const OAuthConfiguration > getConfiguration() const
Returns the configuration of this client.
Definition BaseOAuthClient.h:47
BaseOAuthClient(std::shared_ptr< const tenduke::oauth::OAuthConfiguration > config, std::shared_ptr< const tenduke::http::HTTPClient > httpClient, std::shared_ptr< const tenduke::json::JSONParser > jsonParser, std::shared_ptr< tenduke::time::Clock > clock)
Constructs new instance.
Definition BaseOAuthClient.cpp:32
std::unique_ptr< const tenduke::oauth::OAuthRefreshRequest > refresh(std::shared_ptr< tenduke::oauth::OAuthState > state) const override
Creates OAuthRefreshRequest for refreshing the state.
Definition BaseOAuthClient.cpp:12
const std::shared_ptr< const tenduke::http::HTTPClient > httpClient
HTTP client.
Definition BaseOAuthClient.h:57
const std::shared_ptr< const OAuthConfiguration > config
OAuth configuration.
Definition BaseOAuthClient.h:55
OAuth-client to initiate OAuth authorization flow.
Definition OAuthClient.h:19
OAuth services.
Definition AccessTokenRequestAuthenticator.h:8
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7