10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
tenduke::oauth::BaseOAuthRequest Class Reference

#include <BaseOAuthRequest.h>

Detailed Description

Base OAuthRequest.

This base class has some common utility methods.

Inheritance diagram for tenduke::oauth::BaseOAuthRequest:
tenduke::oauth::OAuthAuthorizationRequest tenduke::oauth::ccg::OAuthClientCredentialsGrantRequest tenduke::oauth::pkce::OAuthPKCERequest tenduke::oauth::ropg::OAuthResourceOwnerPasswordRequest

Protected Member Functions

 BaseOAuthRequest (const std::string &scopes, const std::map< std::string, std::string > &additionalParameters, const std::shared_ptr< const ::tenduke::oauth::OAuthConfiguration > &config, const std::shared_ptr< const ::tenduke::http::HTTPClient > &http, const std::shared_ptr< const ::tenduke::json::JSONParser > &parseJson, const std::shared_ptr<::tenduke::time::Clock > &clock)
 Constructs new instance.
 
virtual std::map< std::string, std::string > buildTokenRequestParameters () const
 Builds base parameters for the token request.
 
virtual std::unique_ptr<::tenduke::oauth::OAuthTokenRequestcreateTokenRequest () const
 Creates the token request.
 
virtual std::unique_ptr<::tenduke::oauth::OAuthStatehandleTokenResponse (std::unique_ptr<::tenduke::oauth::OAuthTokenResponse > response) const
 Handles token response.
 

Protected Attributes

const std::string scopes
 
const std::map< std::string, std::string > additionalParameters
 
const std::shared_ptr< const ::tenduke::oauth::OAuthConfigurationconfig
 
const std::shared_ptr< const ::tenduke::http::HTTPClienthttp
 
const std::shared_ptr< const ::tenduke::json::JSONParserparseJSON
 
const std::shared_ptr<::tenduke::time::Clockclock
 

Constructor & Destructor Documentation

◆ BaseOAuthRequest()

tenduke::oauth::BaseOAuthRequest::BaseOAuthRequest ( const std::string &  scopes,
const std::map< std::string, std::string > &  additionalParameters,
const std::shared_ptr< const ::tenduke::oauth::OAuthConfiguration > &  config,
const std::shared_ptr< const ::tenduke::http::HTTPClient > &  http,
const std::shared_ptr< const ::tenduke::json::JSONParser > &  parseJson,
const std::shared_ptr<::tenduke::time::Clock > &  clock 
)
protected

Constructs new instance.

Parameters
scopes-
additionalParameters-
config-
http-
parseJson-
clock-

Member Function Documentation

◆ buildTokenRequestParameters()

std::map< std::string, std::string > tenduke::oauth::BaseOAuthRequest::buildTokenRequestParameters ( ) const
protectedvirtual

Builds base parameters for the token request.

This method adds following common request parameters:

  • client_id
  • client_secret
Returns
token request parameters

Reimplemented in tenduke::oauth::ccg::OAuthClientCredentialsGrantRequest, and tenduke::oauth::ropg::OAuthResourceOwnerPasswordRequest.

◆ createTokenRequest()

std::unique_ptr<::OAuthTokenRequest > tenduke::oauth::BaseOAuthRequest::createTokenRequest ( ) const
protectedvirtual

Creates the token request.

Returns
the token request.

◆ handleTokenResponse()

std::unique_ptr<::OAuthState > tenduke::oauth::BaseOAuthRequest::handleTokenResponse ( std::unique_ptr<::tenduke::oauth::OAuthTokenResponse response) const
protectedvirtual

Handles token response.

Parameters
responsethe token response
Returns
the new state

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