10Duke Scale C++ Client
Loading...
Searching...
No Matches
tenduke::oauth::device::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 tenduke::oauth::device::OAuthDeviceFlowAuthorizationRequest:
tenduke::oauth::OAuthAuthorizationRequest tenduke::oauth::device::DefaultOAuthDeviceFlowAuthorizationRequest tenduke::test::mocks::OAuthDeviceFlowAuthorizationRequestMock tenduke::test::oauth::device::FakeRequest

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()

virtual std::unique_ptr< tenduke::oauth::OAuthState > tenduke::oauth::device::OAuthDeviceFlowAuthorizationRequest::accessTokenRequest ( )
pure virtual

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

Implemented in tenduke::oauth::device::DefaultOAuthDeviceFlowAuthorizationRequest.

◆ authorizationRequest()

virtual tenduke::oauth::device::DeviceAuthorizationResponse tenduke::oauth::device::OAuthDeviceFlowAuthorizationRequest::authorizationRequest ( )
pure virtual

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

Implemented in tenduke::oauth::device::DefaultOAuthDeviceFlowAuthorizationRequest.

◆ cancel()

virtual void tenduke::oauth::device::OAuthDeviceFlowAuthorizationRequest::cancel ( )
pure virtual

Marks the request canceled.

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

Implemented in tenduke::oauth::device::DefaultOAuthDeviceFlowAuthorizationRequest.


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