1#ifndef TENDUKE_OAUTH_BASEOAUTHCLIENT_H
2#define TENDUKE_OAUTH_BASEOAUTHCLIENT_H
4#include "./OAuthClient.h"
5#include "./OAuthConfiguration.h"
7#include "http/HTTPClient.h"
8#include "json/JSONParser.h"
30 std::shared_ptr<const tenduke::oauth::OAuthConfiguration>
config,
31 std::shared_ptr<const tenduke::http::HTTPClient>
httpClient,
32 std::shared_ptr<const tenduke::json::JSONParser>
jsonParser,
33 std::shared_ptr<tenduke::time::Clock>
clock
44 std::unique_ptr<const tenduke::oauth::OAuthRefreshRequest>
refresh(std::shared_ptr<tenduke::oauth::OAuthState> state)
const override;
48 const std::shared_ptr<const OAuthConfiguration>
config;
50 const std::shared_ptr<const tenduke::http::HTTPClient>
httpClient;
52 const std::shared_ptr<const tenduke::json::JSONParser>
jsonParser;
54 const std::shared_ptr<tenduke::time::Clock>
clock;
const std::shared_ptr< const tenduke::json::JSONParser > jsonParser
For parsing responses.
Definition BaseOAuthClient.h:52
const std::shared_ptr< tenduke::time::Clock > clock
Clock to generate "expires-at" from "expires-in".
Definition BaseOAuthClient.h:54
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
const std::shared_ptr< const tenduke::http::HTTPClient > httpClient
HTTP client.
Definition BaseOAuthClient.h:50
const std::shared_ptr< const OAuthConfiguration > config
OAuth configuration.
Definition BaseOAuthClient.h:48
const std::shared_ptr< const tenduke::json::JSONParser > jsonParser
For parsing responses.
Definition BaseOAuthClient.h:52
const std::shared_ptr< tenduke::time::Clock > clock
Clock to generate "expires-at" from "expires-in".
Definition BaseOAuthClient.h:54
std::shared_ptr< const OAuthConfiguration > getConfiguration() const
Returns the configuration of this client.
Definition BaseOAuthClient.h:40
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:50
const std::shared_ptr< const OAuthConfiguration > config
OAuth configuration.
Definition BaseOAuthClient.h:48
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 APIRequest.h:4