10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
OAuthDeviceFlowAuthorizationRequest Class Referenceabstract

#include <OAuthDeviceFlowAuthorizationRequest.h>

Detailed Description

Authorization request for OAuth Device Flow.

Instances implement all the actual logic for the flow.

See https://datatracker.ietf.org/doc/html/rfc8628.

Inheritance diagram for OAuthDeviceFlowAuthorizationRequest:
tenduke::oauth::OAuthAuthorizationRequest tenduke::oauth::device::DefaultOAuthDeviceFlowAuthorizationRequest

Public Member Functions

virtual tenduke::oauth::device::DeviceAuthorizationResponse authorizationRequest ()=0
 Performs Device Authorization Request.
virtual std::unique_ptr< tenduke::oauth::OAuthStateaccessTokenRequest ()=0
 Performs Device Access Token Request.
virtual void cancel ()=0
 Marks the request canceled.

Member Function Documentation

◆ accessTokenRequest()

Performs Device Access Token Request.

See: https://datatracker.ietf.org/doc/html/rfc8628#section-3.4

Returns
the OAuth state
Exceptions
tenduke::Canceledif the request was canceled by caller
tenduke::TimedOutif the request has timed out (either in client or by backend)
tenduke::http::HTTPException(or subclasses) in case of HTTPExceptions (e.g. HTTP 500)
tenduke::json::JSONException(or subclasses) in case response is not valid JSON (should not happen)
tenduke::net::NetworkingException(or subclasses) e.g. no network, invalid hostname, timeouts
tenduke::oauth::OAuthServerErrorif OAuth server returned an error
tenduke::oauth::OAuthExceptionif some other OAuth error occurred

◆ authorizationRequest()

Performs Device Authorization Request.

See: https://datatracker.ietf.org/doc/html/rfc8628#section-3.1

Returns
the Device Authorization Response (see https://datatracker.ietf.org/doc/html/rfc8628#section-3.2)
Exceptions
tenduke::TimedOutif the request has timed out (either in client or by backend)
tenduke::http::HTTPException(or subclasses) in case of HTTPExceptions (e.g. HTTP 500)
tenduke::net::NetworkingException(or subclasses) e.g. no network, invalid hostname, timeouts
tenduke::oauth::OAuthServerErrorif OAuth server returned an error
tenduke::oauth::OAuthExceptionif some other OAuth error occurred

◆ cancel()

Marks the request canceled.

This will cause the polling to throw tenduke::TimedOut.


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