forked from sony/nmos-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresource_server_error.h
31 lines (28 loc) · 1.05 KB
/
resource_server_error.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef CPPREST_RESOURCE_SERVER_ERROR_H
#define CPPREST_RESOURCE_SERVER_ERROR_H
#include "nmos/string_enum.h"
namespace web
{
namespace http
{
namespace oauth2
{
// experimental extension, for BCP-003-02 Authorization
namespace experimental
{
// "When a request fails, the resource server responds using the
// appropriate HTTP status code (typically, 400, 401, 403, or 405) and
// includes one of the following error codes in the response:"
// see https://tools.ietf.org/html/rfc6750#section-3.1
DEFINE_STRING_ENUM(resource_server_error)
namespace resource_server_errors
{
const resource_server_error invalid_request{ U("invalid_request") };
const resource_server_error invalid_token{ U("invalid_token") };
const resource_server_error insufficient_scope{ U("insufficient_scope") };
}
}
}
}
}
#endif