10Duke Scale C++ Client
Loading...
Searching...
No Matches
tenduke::oidc::OIDCBrowserFlowAuthenticationRequest Class Referenceabstract

#include <OIDCBrowserFlowAuthenticationRequest.h>

Detailed Description

An OIDC-authentication request, which handles the OIDC-flow, authenticating the user with browser.

The request itself does not interact with any browser, but provides methods to handle the browser interaction.

Inheritance diagram for tenduke::oidc::OIDCBrowserFlowAuthenticationRequest:
tenduke::oidc::OIDCAuthenticationRequest tenduke::oidc::DefaultOIDCBrowserFlowAuthenticationRequest tenduke::test::mocks::OIDCBrowserFlowAuthenticationRequestMock

Public Member Functions

virtual std::string buildAuthenticationRequestUrl () const =0
 Creates the initial authenticationrequest URL.
 
virtual std::unique_ptr< tenduke::oidc::OIDCStatehandleCallback (const std::string &redirectURI) const =0
 Handles callback: performs consequent actions to authenticate.
 

Member Function Documentation

◆ buildAuthenticationRequestUrl()

virtual std::string tenduke::oidc::OIDCBrowserFlowAuthenticationRequest::buildAuthenticationRequestUrl ( ) const
pure virtual

Creates the initial authenticationrequest URL.

Navigate browser to this URL.

Returns
-

Implemented in tenduke::oidc::DefaultOIDCBrowserFlowAuthenticationRequest.

◆ handleCallback()

virtual std::unique_ptr< tenduke::oidc::OIDCState > tenduke::oidc::OIDCBrowserFlowAuthenticationRequest::handleCallback ( const std::string &  redirectURI) const
pure virtual

Handles callback: performs consequent actions to authenticate.

See documentation of method tenduke::oauth::OAuthRequest::handleCallback().

The call is synchronous.

Parameters
redirectURIthis is the redirect-URI to which the OIDC server requested the browser to navigate to after the login was successful or in case of some error. The redirect-URI contains all the necessary parameters to finalize the login
Returns
state describing the login session
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 redirectURI (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.
tenduke::net::URLExceptionif problem parsing the redirectURI (should not happen, though)
tenduke::net::MalformedURLExceptionif the redirectURI is invalid

Implemented in tenduke::oidc::DefaultOIDCBrowserFlowAuthenticationRequest.


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