10Duke Enterprise C++ Client
|
#include <OAuthBrowserAuthorizationRequest.h>
OAuth-request to handle OAuth authorization using browser.
This interface does not actually contain any browser integration, but provides the hooks for browser integration.
Public Member Functions | |
virtual std::string | buildAuthorizationRequestUrl () const =0 |
Creates the initial authorization request URL. | |
virtual std::unique_ptr< OAuthState > | handleCallback (const std::string &redirectURI) const =0 |
Handles callback: performs consequent actions to authorize. | |
|
pure virtual |
Creates the initial authorization request URL.
Navigate browser to this URL.
Implemented in tenduke::oauth::pkce::OAuthPKCERequest.
|
pure virtual |
Handles callback: performs consequent actions to authorize.
In the flow, the OAuth-server signals success or error by navigating (using HTTP-redirect) to configured redirect-URI. You must listen the browser events to detect, when the redirect-URI is navigated to. Once you detect navigation to the redirect-URI, call this method with the complete redirect-URI.
The call is synchronous.
redirectURI | - |
std::nested_exception | when 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::JSONParsingException | when server response is not valid JSON |
tenduke::oauth::OAuthException | when the server response is not what we expected, e.g.
|
tenduke::oauth::OAuthServerError | when the server responds with an error |
tenduke::net::NetworkingException | (or subclasses of it) when networking error occurred, e.g.
|
tenduke::net::URLException | if problem parsing the redirectURI (should not happen, though) |
tenduke::net::MalformedURLException | if the redirectURI is invalid |
Implemented in tenduke::oauth::pkce::OAuthPKCERequest.