10Duke Scale C++ Client
Loading...
Searching...
No Matches
tenduke::oauth::OAuthRefreshRequest Class Referenceabstract

#include <OAuthRefreshRequest.h>

Detailed Description

Request to refresh OAuthState.

Inheritance diagram for tenduke::oauth::OAuthRefreshRequest:
tenduke::oauth::DefaultOAuthRefreshRequest tenduke::test::mocks::OAuthRefreshRequestMock

Public Member Functions

virtual std::unique_ptr< OAuthStateexecute () const =0
 Executes the refresh request.
 

Member Function Documentation

◆ execute()

virtual std::unique_ptr< OAuthState > tenduke::oauth::OAuthRefreshRequest::execute ( ) const
pure virtual

Executes the refresh request.

The call is synchronous.

Returns
the refreshed OAuth-state
Exceptions
std::nested_exceptionwhen the there is some nested cause
tenduke::http::HTTPException(or subclasses of it) when the server responds with HTTP error status code which does not indicate OAuth-error, e.g. 500 (internal server error) or 404 (not found = wrong endpoint configured)
tenduke::json::JSONParsingExceptionwhen server response is not valid JSON
tenduke::oauth::OAuthExceptionwhen the server response is not what we expected, e.g.
  • problems with the redirect-URI (missing or invalid "state", missing "code")
  • The token response does not contain access_token
  • The token response payload is not JSON-object
tenduke::oauth::OAuthServerErrorwhen the server responds with an error
tenduke::net::NetworkingException(or subclasses of it) when networking error occurred, e.g.

Implemented in tenduke::oauth::DefaultOAuthRefreshRequest.


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