10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
tenduke::oauth::BaseOAuthClient Class Reference

#include <BaseOAuthClient.h>

Detailed Description

Base class for OAuth-clients.

A rather torso, since browser-based and device-flow clients have wildly different signatures.

Inheritance diagram for tenduke::oauth::BaseOAuthClient:
tenduke::oauth::OAuthClient tenduke::oauth::ccg::OAuthClientCredentialsGrantFlow tenduke::oauth::device::DefaultOAuthDeviceFlow tenduke::oauth::pkce::OAuthPKCEFlow tenduke::oauth::ropg::OAuthResourceOwnerPasswordFlow

Public Member Functions

 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 OAuthConfiguration > getConfiguration () const
 Returns the configuration of this client.
std::unique_ptr< const tenduke::oauth::OAuthRefreshRequest > refresh (std::shared_ptr< tenduke::oauth::OAuthState > state) const override
 Creates OAuthRefreshRequest for refreshing the state.
std::string getClientId () const override
 Returns the OAuth client id of this client.

Protected Attributes

const std::shared_ptr< const OAuthConfiguration > config
 OAuth configuration.
const std::shared_ptr< const tenduke::http::HTTPClient > httpClient
 HTTP client.
const std::shared_ptr< const tenduke::json::JSONParser > jsonParser
 For parsing responses.
const std::shared_ptr< tenduke::time::Clock > clock
 Clock to generate "expires-at" from "expires-in".

Constructor & Destructor Documentation

◆ BaseOAuthClient()

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.

Parameters
config-
httpClient-
jsonParser-
clock-

Member Function Documentation

◆ getClientId()

std::string tenduke::oauth::BaseOAuthClient::getClientId ( ) const
inlineoverridevirtual

Returns the OAuth client id of this client.

Returns
-

Implements tenduke::oauth::OAuthClient.

◆ getConfiguration()

std::shared_ptr< const OAuthConfiguration > tenduke::oauth::BaseOAuthClient::getConfiguration ( ) const
inline

Returns the configuration of this client.

Returns
-

◆ refresh()

std::unique_ptr< const::OAuthRefreshRequest > tenduke::oauth::BaseOAuthClient::refresh ( std::shared_ptr< tenduke::oauth::OAuthState > state) const
overridevirtual

Creates OAuthRefreshRequest for refreshing the state.

After executing the request, assign the returned state back to the original state to get refresh results.

Parameters
statethe state to refresh
Returns
the refresh request
Exceptions
tenduke::oauth::OAuthExceptionif the state is not refreshable.

Implements tenduke::oauth::OAuthClient.


The documentation for this class was generated from the following files:
  • core/oidc/core/src/oauth/BaseOAuthClient.h
  • core/oidc/core/src/oauth/BaseOAuthClient.cpp