10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
tenduke::ee::licensing::impl::StatefulCheckoutRequestTemplate< T > Class Template Reference

#include <StatefulCheckoutRequestTemplate.h>

Detailed Description

template<class T>
class tenduke::ee::licensing::impl::StatefulCheckoutRequestTemplate< T >

Common base for stateful checkout-like requests.

Currently used with checkouts and renews.

The execution first checks that the local OIDC session is valid and if it is not it either refreshes the OIDC session or logs the user in.

If the execution of the delegate request fails, the code checks if the request failed and tries to detect if the failure was because of invalid credentials (e.g. credentials expired or invalidated by admin). If so, the session is refreshed or user is logged in after which the request is re-executed.

No other re-try mechanisms are in place. In case of other error conditions or if the re-execution fails, exceptions are propagated to the called.

Template Parameters
Ttype of the response

Public Member Functions

 StatefulCheckoutRequestTemplate (std::unique_ptr<::tenduke::ee::licensing::authzapi::LicensingRequest< T > > request, const std::shared_ptr<::tenduke::oidc::OIDCSession > &oidc)
 Constructs new instance.
 
execute ()
 Executes the request.
 

Protected Member Functions

reEstablishOIDCSessionAndRetry ()
 

Constructor & Destructor Documentation

◆ StatefulCheckoutRequestTemplate()

template<class T >
tenduke::ee::licensing::impl::StatefulCheckoutRequestTemplate< T >::StatefulCheckoutRequestTemplate ( std::unique_ptr<::tenduke::ee::licensing::authzapi::LicensingRequest< T > >  request,
const std::shared_ptr<::tenduke::oidc::OIDCSession > &  oidc 
)
inline

Constructs new instance.

Parameters
requestthe actual request delegate
oidcservice to manage OIDC session

Member Function Documentation

◆ execute()

template<class T >
T tenduke::ee::licensing::impl::StatefulCheckoutRequestTemplate< T >::execute ( )
inline

Executes the request.

Returns
-
Exceptions
tenduke::TendukeExceptionand subclasses, depending on the error condition (e.g. tenduke::net::UnknownHostException if host not found for some reason).

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