10Duke Scale C++ Client
All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
OAuthServerError.h
1#ifndef TENDUKE_OAUTH_OAUTHSERVERERROR_H
2#define TENDUKE_OAUTH_OAUTHSERVERERROR_H
3
4#include "./OAuthException.h"
5
6#include <stdexcept>
7#include <string>
8
9namespace tenduke { namespace oauth {
10
12const std::string ERROR_INVALID_REQUEST = "invalid_request";
14const std::string ERROR_INVALID_CLIENT = "invalid_client";
16const std::string ERROR_INVALID_GRANT = "invalid_grant";
18const std::string ERROR_UNAUTHORIZED_CLIENT = "unauthorized_client";
20const std::string ERROR_UNSUPPORTED_GRANT_TYPE = "unsupported_grant_type";
22const std::string ERROR_INVALID_SCOPE = "invalid_scope";
23
28{
29public:
36 OAuthServerError(Phase phase, std::string error, const std::string &errorDescription)
37 : tenduke::oauth::OAuthException(phase, std::move(error), errorDescription)
38 {}
39};
40
41
42}}
43
44#endif // TENDUKE_OAUTH_OAUTHSERVERERROR_H
Generic OAuth-related exception.
Definition OAuthException.h:15
Phase
Phase where this exception occurred.
Definition OAuthException.h:21
Thrown when server reported an OAuth-related error.
Definition OAuthServerError.h:28
OAuthServerError(Phase phase, std::string error, const std::string &errorDescription)
Constructs new instance.
Definition OAuthServerError.h:36
OAuth services.
Definition AccessTokenRequestAuthenticator.h:8
const std::string ERROR_INVALID_CLIENT
OAuth2 error code for "invalid client".
Definition OAuthServerError.h:14
const std::string ERROR_INVALID_REQUEST
OAuth2 error code for "invalid request".
Definition OAuthServerError.h:12
const std::string ERROR_UNSUPPORTED_GRANT_TYPE
OAuth2 error code for "unsupported grant type".
Definition OAuthServerError.h:20
const std::string ERROR_UNAUTHORIZED_CLIENT
OAuth2 error code for "unauthorized client".
Definition OAuthServerError.h:18
const std::string ERROR_INVALID_SCOPE
OAuth2 error code for "invalid scope".
Definition OAuthServerError.h:22
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7