10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
tenduke::oauth Namespace Reference

Detailed Description

OAuth services.

Implementation of OAuth -authorization protocol.

See RFC 6749.

Namespaces

namespace  device
 Implementation of OAuth device flow.
namespace  pkce
 Implementation of OAuth "Authorization Code Flow with PKCE".

Classes

class  AccessTokenRequestAuthenticator
 A tenduke::http::HTTPRequestAuthenticator, which uses fixed access token to authenticate HTTP-requests. More...
class  BaseOAuthClient
 Base class for OAuth-clients. More...
class  BaseOAuthRequest
 Base OAuthRequest. More...
class  DefaultOAuthRefreshRequest
 Default implementation tenduke::oauth::OAuthRefreshRequest. More...
class  HTTPResponseToOAuthException
 Throws OAuthExceptions based on HTTP error response. More...
class  OAuthAuthorizationRequest
 OAuth-request handles the OAuth authorization flow. More...
class  OAuthBackendConfiguration
 Container for OAuth-backend configuration. More...
class  OAuthBrowserAuthorizationRequest
 OAuth-request to handle OAuth authorization using browser. More...
class  OAuthBrowserFlow
 OAuth-client to initiate OAuth authorization flow. More...
class  OAuthClient
 OAuth-client to initiate OAuth authorization flow. More...
class  OAuthClientConfiguration
 Container for OAuth-client-configuration. More...
class  OAuthConfiguration
 Container for OAuth-configuration. More...
class  OAuthException
 Generic OAuth-related exception. More...
class  OAuthInvalidGrant
 Exception thrown when server reported "invalid_grant". More...
class  OAuthInvalidState
 Exception thrown when the redirect URI of an authorization response does not contain "state", or the "state" does not match the authorization request. More...
class  OAuthRefreshRequest
 Request to refresh OAuthState. More...
class  OAuthServerError
 Thrown when server reported an OAuth-related error. More...
class  OAuthState
 OAuth session state. More...
class  OAuthStateImpl
 Implementation of OAuthState. More...
class  OAuthTokenRequest
 OAuth token request. More...
class  OAuthTokenResponse
 Encapsulates results from tenduke::oauth::OAuthTokenRequest. More...

Functions

void checkAdditionalParameters (const std::map< std::string, std::string > &additionalParameters, const std::set< std::string > &reservedNames)
 Checks that additional (custom) request parameters do not use names of parameters the request sets itself.

Variables

const std::string ERROR_INVALID_REQUEST = "invalid_request"
 OAuth2 error code for "invalid request".
const std::string ERROR_INVALID_CLIENT = "invalid_client"
 OAuth2 error code for "invalid client".
const std::string ERROR_INVALID_GRANT = "invalid_grant"
 OAuth2 error code for "invalid grant".
const std::string ERROR_UNAUTHORIZED_CLIENT = "unauthorized_client"
 OAuth2 error code for "unauthorized client".
const std::string ERROR_UNSUPPORTED_GRANT_TYPE = "unsupported_grant_type"
 OAuth2 error code for "unsupported grant type".
const std::string ERROR_INVALID_SCOPE = "invalid_scope"
 OAuth2 error code for "invalid scope".
const std::int64_t TOKEN_DOES_NOT_EXPIRE = INT64_MAX
 Magic value to denote that the access token does not expire.

Function Documentation

◆ checkAdditionalParameters()

void tenduke::oauth::checkAdditionalParameters ( const std::map< std::string, std::string > & additionalParameters,
const std::set< std::string > & reservedNames )

Checks that additional (custom) request parameters do not use names of parameters the request sets itself.

Additional parameters must not replace or duplicate protocol parameters, e.g. client_id, redirect_uri or code_challenge_method, because that would silently change or weaken the flow.

Parameters
additionalParametersthe additional parameters
reservedNamesnames of the parameters the request sets itself
Exceptions
std::invalid_argumentif an additional parameter uses a reserved name