|
10Duke Enterprise C++ SDK
|
#include <DeviceAuthorizationResponse.h>
Device Authorization Response.
See https://datatracker.ietf.org/doc/html/rfc8628#section-3.2.
NOTE: This implementation estimates "expires at epoch seconds" instead of "expires after seconds".
The values come from the authorization server: treat them as untrusted. verificationUri and verificationUriComplete have been checked to be absolute https URLs (http only for loopback hosts) without characters which are not allowed in a URI, but their host is not checked. When displaying them, escape them as appropriate for the UI (e.g. HTML). Open them only with a browser integration which passes the URL to the browser safely, e.g. tenduke::osa::BrowserIntegration of this library.
Public Member Functions | |
| DeviceAuthorizationResponse (std::string deviceCode, std::string userCode, std::string verificationUri, std::string verificationUriComplete, const int64_t expiresAtEpochS, const int64_t intervalS) | |
| Constructs new instance. | |
Public Attributes | |
| const std::string | deviceCode |
| The device code. | |
| const std::string | userCode |
| The user code. | |
| const std::string | verificationUri |
| The verification URI: an absolute https URL (http only for loopback hosts). | |
| const std::string | verificationUriComplete |
| The complete verification URI, which includes the user code: an absolute https URL (http only for loopback hosts), or empty string if the server did not provide one. | |
| const std::int64_t | expiresAtEpochS |
| Expires-at (epoch seconds). | |
| const std::int64_t | intervalS |
| Polling interval in seconds. | |
|
inline |
Constructs new instance.
| deviceCode | - |
| userCode | - |
| verificationUri | - |
| verificationUriComplete | - |
| expiresAtEpochS | - |
| intervalS | - |