10Duke Scale C++ Client
Loading...
Searching...
No Matches
tenduke::oauth::device::DefaultOAuthDeviceFlow Class Reference

#include <DefaultOAuthDeviceFlow.h>

Detailed Description

Default implementation of tenduke::oauth::device::OAuthDeviceFlow.

Inheritance diagram for tenduke::oauth::device::DefaultOAuthDeviceFlow:
tenduke::oauth::BaseOAuthClient tenduke::oauth::device::OAuthDeviceFlow tenduke::oauth::OAuthClient tenduke::oauth::OAuthClient

Public Member Functions

 DefaultOAuthDeviceFlow (const std::shared_ptr< const tenduke::oauth::OAuthConfiguration > &oauthConfiguration, const std::shared_ptr< const tenduke::http::HTTPClient > &httpClient, const std::shared_ptr< const tenduke::json::JSONParser > &jsonParser, const std::shared_ptr< tenduke::time::Clock > &clock, std::uint64_t defaultClientTimeoutS=tenduke::oauth::device::DEVICEFLOW_DOES_NOT_TIMEOUT)
 Constructs new instance.
 
std::unique_ptr< tenduke::oauth::device::OAuthDeviceFlowAuthorizationRequestauthorize (const std::string &scope, const std::map< std::string, std::string > &additionalParameters) const override
 Starts authorization.
 
- Public Member Functions inherited from tenduke::oauth::BaseOAuthClient
 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.
 
std::shared_ptr< const OAuthConfigurationgetConfiguration () const
 Returns the configuration of this client.
 
std::unique_ptr< const tenduke::oauth::OAuthRefreshRequestrefresh (std::shared_ptr< tenduke::oauth::OAuthState > state) const override
 Creates OAuthRefreshRequest for refreshing the state.
 

Additional Inherited Members

- Protected Attributes inherited from tenduke::oauth::BaseOAuthClient
const std::shared_ptr< const OAuthConfigurationconfig
 OAuth configuration.
 
const std::shared_ptr< const tenduke::http::HTTPClienthttpClient
 HTTP client.
 
const std::shared_ptr< const tenduke::json::JSONParserjsonParser
 For parsing responses.
 
const std::shared_ptr< tenduke::time::Clockclock
 Clock to generate "expires-at" from "expires-in".
 

Constructor & Destructor Documentation

◆ DefaultOAuthDeviceFlow()

tenduke::oauth::device::DefaultOAuthDeviceFlow::DefaultOAuthDeviceFlow ( const std::shared_ptr< const tenduke::oauth::OAuthConfiguration > &  oauthConfiguration,
const std::shared_ptr< const tenduke::http::HTTPClient > &  httpClient,
const std::shared_ptr< const tenduke::json::JSONParser > &  jsonParser,
const std::shared_ptr< tenduke::time::Clock > &  clock,
std::uint64_t  defaultClientTimeoutS = tenduke::oauth::device::DEVICEFLOW_DOES_NOT_TIMEOUT 
)

Constructs new instance.

Parameters
oauthConfiguration
httpClient
jsonParser
clock
defaultClientTimeoutSauthorization request timeout at client end: Authorization requests taking longer than this will throw exception. By default the authorization requests do not time out.

Member Function Documentation

◆ authorize()

std::unique_ptr<::OAuthDeviceFlowAuthorizationRequest > tenduke::oauth::device::DefaultOAuthDeviceFlow::authorize ( const std::string &  scope,
const std::map< std::string, std::string > &  additionalParameters 
) const
overridevirtual

Starts authorization.

Parameters
scope-
additionalParameters-
Returns
-

Implements tenduke::oauth::device::OAuthDeviceFlow.


The documentation for this class was generated from the following files: