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

#include <OAuthResourceOwnerPasswordRequest.h>

Detailed Description

OAuth Resource Owner Password Credentials Grant implementation of tenduke::oauth::OAuthRequest.

Inheritance diagram for tenduke::oauth::ropg::OAuthResourceOwnerPasswordRequest:
tenduke::oauth::BaseOAuthRequest tenduke::oauth::OAuthAuthorizationRequest

Public Member Functions

 OAuthResourceOwnerPasswordRequest (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 > &httpClient, const std::shared_ptr< const ::tenduke::json::JSONParser > &jsonParser, const std::shared_ptr<::tenduke::time::Clock > &clock, const ::tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider &credentialsProvider)
 Constructs new instance.
 
std::unique_ptr<::tenduke::oauth::OAuthStateaccessTokenRequest () const
 Performs the access token request.
 

Protected Member Functions

std::map< std::string, std::string > buildTokenRequestParameters () const override
 Builds base parameters for the token request.
 
- Protected Member Functions inherited from 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)
 Constructs new instance.
 
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.
 

Additional Inherited Members

- Protected Attributes inherited from tenduke::oauth::BaseOAuthRequest
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

◆ OAuthResourceOwnerPasswordRequest()

tenduke::oauth::ropg::OAuthResourceOwnerPasswordRequest::OAuthResourceOwnerPasswordRequest ( 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 > &  httpClient,
const std::shared_ptr< const ::tenduke::json::JSONParser > &  jsonParser,
const std::shared_ptr<::tenduke::time::Clock > &  clock,
const ::tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider credentialsProvider 
)

Constructs new instance.

Parameters
scopes-
additionalParameters-
config-
httpClient-
jsonParser-
clock-

Member Function Documentation

◆ accessTokenRequest()

std::unique_ptr<::OAuthState > tenduke::oauth::ropg::OAuthResourceOwnerPasswordRequest::accessTokenRequest ( ) const

Performs the access token request.

Returns
the OAuth state
Exceptions
tenduke::TendukeExceptionand subclasses.
tenduke::oauth::OAuthInvalidGrantin case the credentials are incorrect

◆ buildTokenRequestParameters()

std::map< std::string, std::string > tenduke::oauth::ropg::OAuthResourceOwnerPasswordRequest::buildTokenRequestParameters ( ) const
overrideprotectedvirtual

Builds base parameters for the token request.

This method adds following common request parameters:

  • client_id
  • client_secret
Returns
token request parameters

Reimplemented from tenduke::oauth::BaseOAuthRequest.


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