1#ifndef TENDUKE_OAUTH_DEVICE_DEFAULTOAUTHDEVICEFLOWAUTHORIZATIONREQUEST_H
2#define TENDUKE_OAUTH_DEVICE_DEFAULTOAUTHDEVICEFLOWAUTHORIZATIONREQUEST_H
4#include "./OAuthDeviceFlowAuthorizationRequest.h"
5#include "./DeviceAuthorizationResponse.h"
6#include "oauth/OAuthConfiguration.h"
7#include "oauth/OAuthState.h"
9#include "http/HTTPClient.h"
10#include "http/HTTPResponseToException.h"
11#include "json/JSONParser.h"
12#include "time/Clock.h"
42 const std::map<std::string, std::string> &additionalParameters,
43 std::uint64_t timeoutS,
44 const std::shared_ptr<const tenduke::oauth::OAuthConfiguration> &configuration,
45 const std::shared_ptr<tenduke::time::Clock> &clock,
46 const std::shared_ptr<const tenduke::http::HTTPClient> &httpClient,
47 const std::shared_ptr<const tenduke::http::HTTPResponseToException> &throwException,
48 const std::shared_ptr<const tenduke::json::JSONParser> &jsonParser
62 virtual void sleepFor(std::chrono::milliseconds slumbertime);
65 const std::string scope;
66 const std::map<std::string, std::string> additionalParameters;
67 const std::uint64_t timeoutS;
71 std::unique_ptr<tenduke::oauth::device::DeviceAuthorizationResponse> response;
73 const std::shared_ptr<const tenduke::oauth::OAuthConfiguration> configuration;
74 const std::shared_ptr<tenduke::time::Clock> clock;
75 const std::shared_ptr<const tenduke::http::HTTPClient> http;
76 const std::shared_ptr<const tenduke::http::HTTPResponseToException> throwException;
77 const std::shared_ptr<const tenduke::json::JSONParser> parseJSON;
DefaultOAuthDeviceFlowAuthorizationRequest(std::string scope, const std::map< std::string, std::string > &additionalParameters, std::uint64_t timeoutS, const std::shared_ptr< const tenduke::oauth::OAuthConfiguration > &configuration, const std::shared_ptr< tenduke::time::Clock > &clock, const std::shared_ptr< const tenduke::http::HTTPClient > &httpClient, const std::shared_ptr< const tenduke::http::HTTPResponseToException > &throwException, const std::shared_ptr< const tenduke::json::JSONParser > &jsonParser)
Constructs new instance.
Definition DefaultOAuthDeviceFlowAuthorizationRequest.cpp:156
DefaultOAuthDeviceFlowAuthorizationRequest(std::string scope, const std::map< std::string, std::string > &additionalParameters, std::uint64_t timeoutS, const std::shared_ptr< const tenduke::oauth::OAuthConfiguration > &configuration, const std::shared_ptr< tenduke::time::Clock > &clock, const std::shared_ptr< const tenduke::http::HTTPClient > &httpClient, const std::shared_ptr< const tenduke::http::HTTPResponseToException > &throwException, const std::shared_ptr< const tenduke::json::JSONParser > &jsonParser)
Constructs new instance.
Definition DefaultOAuthDeviceFlowAuthorizationRequest.cpp:156
virtual void sleepFor(std::chrono::milliseconds slumbertime)
Sleeps for given time.
Definition DefaultOAuthDeviceFlowAuthorizationRequest.cpp:151
tenduke::oauth::device::DeviceAuthorizationResponse authorizationRequest() override
Performs Device Authorization Request.
Definition DefaultOAuthDeviceFlowAuthorizationRequest.cpp:37
std::unique_ptr< tenduke::oauth::OAuthState > accessTokenRequest() override
Performs Device Access Token Request.
Definition DefaultOAuthDeviceFlowAuthorizationRequest.cpp:72
void cancel() override
Marks the request canceled.
Definition DefaultOAuthDeviceFlowAuthorizationRequest.cpp:146
Device Authorization Response.
Definition DeviceAuthorizationResponse.h:18
Authorization request for OAuth Device Flow.
Definition OAuthDeviceFlowAuthorizationRequest.h:23
Implementation of OAuth device flow.
Definition DefaultOAuthDeviceFlow.h:18
OAuth services.
Definition AccessTokenRequestAuthenticator.h:8
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4