1
0
Fork 0

removed unused error codes

This commit is contained in:
Jan Steemann 2012-09-14 15:18:28 +02:00
parent 07ccc2083b
commit f7e98df4a3
8 changed files with 1 additions and 897 deletions

View File

@ -1,417 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
/// @brief session handler
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2004-2012 triagens GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
/// Copyright holder is triAGENS GmbH, Cologne, Germany
///
/// @author Dr. Frank Celler
/// @author Martin Schoenert
/// @author Copyright 2011-2012, triAGENS GmbH, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
#include "SessionHandler.h"
#include "Basics/MutexLocker.h"
#include "Rest/HttpRequest.h"
#include "Rest/HttpResponse.h"
#include "UserManager/Role.h"
#include "UserManager/Session.h"
#include "UserManager/User.h"
#include "Variant/VariantArray.h"
#include "Variant/VariantBoolean.h"
#include "Variant/VariantInt32.h"
#include "Variant/VariantVector.h"
using namespace triagens::basics;
using namespace triagens::rest;
using namespace triagens::admin;
// -----------------------------------------------------------------------------
// --SECTION-- static public methods
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup RestServer
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief static constructor
////////////////////////////////////////////////////////////////////////////////
HttpHandler* SessionHandler::create (rest::HttpRequest* request, void* data) {
return new SessionHandler(request, (ApplicationAdminServer*) data);
}
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- constructors and destructors
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup RestServer
/// @{
////////////////////////////////////////////////////////////////////////////////
SessionHandler::SessionHandler (HttpRequest* request, ApplicationAdminServer* server)
: RestBaseHandler(request), _server(server) {
}
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- Handler methods
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup RestServer
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// {@inheritDoc}
////////////////////////////////////////////////////////////////////////////////
bool SessionHandler::isDirect () {
return true;
}
////////////////////////////////////////////////////////////////////////////////
/// {@inheritDoc}
////////////////////////////////////////////////////////////////////////////////
HttpHandler::status_e SessionHandler::execute () {
// execute the request
switch (_request->requestType()) {
case HttpRequest::HTTP_REQUEST_POST: return executePost();
case HttpRequest::HTTP_REQUEST_GET: return executeGet();
case HttpRequest::HTTP_REQUEST_PUT: return executePut();
case HttpRequest::HTTP_REQUEST_DELETE: return executeDelete();
default:
generateError(HttpResponse::METHOD_NOT_ALLOWED, TRI_ERROR_HTTP_METHOD_NOT_ALLOWED);
return HANDLER_DONE;
}
}
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- private methods
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup RestServer
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief creates a session
///
/// @RESTHEADER{POST /_admin/user-manager/sessions,creates a front-end session}
///
/// @REST{POST /_admin/user-manager/session}
///
/// Creates a new session. Returns an object with the following attributes.
///
/// - @LIT{sid}: The session identifier.
///
/// - @LIT{rights}: A list of rights for the newly created session.
////////////////////////////////////////////////////////////////////////////////
HttpHandler::status_e SessionHandler::executePost () {
if (_request->suffix().size() != 0) {
generateError(HttpResponse::BAD, TRI_ERROR_SESSION_SESSIONHANDLER_URL_INVALID1);
return HANDLER_DONE;
}
// create a new session
MUTEX_LOCKER(Session::lock);
Session* session = Session::create();
generateSession(session);
return HANDLER_DONE;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief reads a session
///
/// @RESTHEADER{GET /_admin/user-manager/sessions,reads a front-end session}
///
/// @REST{GET /_admin/user-manager/session/@FA{sid}}
///
/// Returns an object with the following attributes describing the session
/// @FA{sid}.
///
/// - @LIT{sid}: The session identifier.
///
/// - @LIT{rights}: A list of rights for the newly created session.
///
/// Note that @LIT{HTTP 404} is returned, if the session is unknown or expired.
////////////////////////////////////////////////////////////////////////////////
HttpHandler::status_e SessionHandler::executeGet () {
vector<string> const& suffix = _request->suffix();
if (suffix.size() != 1) {
generateError(HttpResponse::BAD, TRI_ERROR_SESSION_SESSIONHANDLER_URL_INVALID2);
return HANDLER_DONE;
}
string const& sid = suffix[0];
// lookup an existing session
MUTEX_LOCKER(Session::lock);
Session* session = Session::lookup(sid);
if (session != 0) {
generateSession(session);
}
else {
generateError(HttpResponse::NOT_FOUND, TRI_ERROR_SESSION_SESSIONHANDLER_SESSION_UNKNOWN);
}
return HANDLER_DONE;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief updates a session
////////////////////////////////////////////////////////////////////////////////
HttpHandler::status_e SessionHandler::executePut () {
vector<string> const& suffix = _request->suffix();
if (suffix.size() != 2) {
generateError(HttpResponse::BAD, TRI_ERROR_SESSION_SESSIONHANDLER_URL_INVALID3);
return HANDLER_DONE;
}
string const& sid = suffix[0];
string const& method = suffix[1];
// lookup an existing session
MUTEX_LOCKER(Session::lock);
Session* session = Session::lookup(sid);
if (session != 0) {
if (method == "login") {
return executeLogin(session);
}
else if (method == "logout") {
return executeLogout(session);
}
else if (method == "password") {
return executePassword(session);
}
generateError(HttpResponse::METHOD_NOT_ALLOWED, TRI_ERROR_HTTP_METHOD_NOT_ALLOWED);
return HANDLER_DONE;
}
else {
generateError(HttpResponse::NOT_FOUND, TRI_ERROR_SESSION_SESSIONHANDLER_SESSION_UNKNOWN);
}
return HANDLER_DONE;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief deletes a session
////////////////////////////////////////////////////////////////////////////////
HttpHandler::status_e SessionHandler::executeDelete () {
vector<string> const& suffix = _request->suffix();
if (suffix.size() != 1) {
generateError(HttpResponse::BAD, TRI_ERROR_SESSION_SESSIONHANDLER_URL_INVALID4);
return HANDLER_DONE;
}
string const& sid = suffix[0];
// lookup an existing session
MUTEX_LOCKER(Session::lock);
Session* session = Session::lookup(sid);
bool removed = false;
if (session != 0) {
removed = Session::remove(session);
}
VariantArray* result = new VariantArray();
result->add("removed", new VariantBoolean(removed));
generateResult(result);
return HANDLER_DONE;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief logs in an user
///
/// @RESTHEADER{PUT /_admin/user-manager/sessions/.../login,logs in into a front-end session}
///
/// @REST{PUT /_admin/user-manager/session/@FA{sid}/login}
///
/// Logs an user into an existing session. Expects an object with the following
/// attributes.
///
/// - @LIT{user}: The user name.
///
/// - @LIT{password}: The password. The password must be a SHA256 hash of the
/// real password.
////////////////////////////////////////////////////////////////////////////////
HttpHandler::status_e SessionHandler::executeLogin (Session* session) {
struct Description : public InputParser::ObjectDescription {
Description () {
attribute("user", user);
attribute("password", password);
}
string user;
string password;
} desc;
bool ok = parseBody(desc);
if (! ok) {
return HANDLER_DONE;
}
string reason;
ok = session->login(desc.user, desc.password, reason);
if (! ok) {
generateError(HttpResponse::UNAUTHORIZED, TRI_ERROR_SESSION_SESSIONHANDLER_CANNOT_LOGIN, reason);
return HANDLER_DONE;
}
generateSession(session);
return HANDLER_DONE;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief logs out an user
///
/// @RESTHEADER{PUT /_admin/user-manager/sessions/.../logout,logs out from a front-end session}
///
/// @REST{PUT /_admin/user-manager/session/@FA{sid}/logout}
///
/// Logs out an user from the existing session.
////////////////////////////////////////////////////////////////////////////////
HttpHandler::status_e SessionHandler::executeLogout (Session* session) {
session->logout();
generateSession(session);
return HANDLER_DONE;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief changes the password
///
/// @RESTHEADER{PUT /_admin/user-manager/sessions/.../password,changes the password of a front-end session}
///
/// @REST{PUT /_admin/user-manager/session/@FA{sid}/password}
///
/// Changes the password of an user. Expects an object with the following
/// attributes.
///
/// - @LIT{password}: The password. The password must be a SHA256 hash of the
/// real password.
////////////////////////////////////////////////////////////////////////////////
HttpHandler::status_e SessionHandler::executePassword (Session* session) {
User* user = session->getUser();
if (user == 0) {
generateError(HttpResponse::BAD, TRI_ERROR_SESSION_SESSIONHANDLER_SESSION_NOT_BOUND);
return HANDLER_DONE;
}
struct Description : public InputParser::ObjectDescription {
Description () {
attribute("password", password);
}
string password;
} desc;
bool ok = parseBody(desc);
if (! ok) {
return HANDLER_DONE;
}
bool changed = user->changePassword(desc.password);
VariantArray* result = new VariantArray();
result->add("changed", new VariantBoolean(changed));
generateResult(result);
return HANDLER_DONE;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief generates a new session
////////////////////////////////////////////////////////////////////////////////
void SessionHandler::generateSession (Session* session) {
VariantArray* result = new VariantArray();
result->add("sid", session->getSid());
User* user = session->getUser();
if (user != 0) {
result->add("user", user->getName());
}
VariantVector* r = new VariantVector();
set<right_t> const& rights = (user == 0) ? Session::anonymousRights() : user->getRole()->getRights();
for (set<right_t>::const_iterator i = rights.begin(); i != rights.end(); ++i) {
r->add(new VariantInt32(*i));
}
result->add("rights", r);
generateResult(result);
}
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
// Local Variables:
// mode: outline-minor
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)"
// End:

View File

@ -1,218 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
/// @brief session handler
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2004-2012 triagens GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
/// Copyright holder is triAGENS GmbH, Cologne, Germany
///
/// @author Dr. Frank Celler
/// @author Martin Schoenert
/// @author Copyright 2010-2012, triAGENS GmbH, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
#ifndef TRIAGENS_USER_MANAGER_SESSION_HANDLER_H
#define TRIAGENS_USER_MANAGER_SESSION_HANDLER_H 1
#include "Admin/RestBaseHandler.h"
namespace triagens {
namespace admin {
class ApplicationAdminServer;
class Session;
// -----------------------------------------------------------------------------
// --SECTION-- class SessionHandler
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup RestServer
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief session handler
////////////////////////////////////////////////////////////////////////////////
class SessionHandler : public RestBaseHandler {
public:
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- static public methods
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup RestServer
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief static constructor
////////////////////////////////////////////////////////////////////////////////
static rest::HttpHandler* create (rest::HttpRequest* request, void* data);
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- constructors and destructors
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup RestServer
/// @{
////////////////////////////////////////////////////////////////////////////////
protected:
////////////////////////////////////////////////////////////////////////////////
/// @brief constructor
////////////////////////////////////////////////////////////////////////////////
SessionHandler (rest::HttpRequest* request, ApplicationAdminServer*);
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- Handler methods
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup RestServer
/// @{
////////////////////////////////////////////////////////////////////////////////
public:
////////////////////////////////////////////////////////////////////////////////
/// {@inheritDoc}
////////////////////////////////////////////////////////////////////////////////
bool isDirect ();
////////////////////////////////////////////////////////////////////////////////
/// {@inheritDoc}
////////////////////////////////////////////////////////////////////////////////
status_e execute ();
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- private methods
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup RestServer
/// @{
////////////////////////////////////////////////////////////////////////////////
private:
////////////////////////////////////////////////////////////////////////////////
/// @brief creates a session
////////////////////////////////////////////////////////////////////////////////
status_e executePost ();
////////////////////////////////////////////////////////////////////////////////
/// @brief reads a session
////////////////////////////////////////////////////////////////////////////////
status_e executeGet ();
////////////////////////////////////////////////////////////////////////////////
/// @brief updates a session
////////////////////////////////////////////////////////////////////////////////
status_e executePut ();
////////////////////////////////////////////////////////////////////////////////
/// @brief deletes a session
////////////////////////////////////////////////////////////////////////////////
status_e executeDelete ();
////////////////////////////////////////////////////////////////////////////////
/// @brief logs in an user
////////////////////////////////////////////////////////////////////////////////
status_e executeLogin (Session*);
////////////////////////////////////////////////////////////////////////////////
/// @brief logs out an user
////////////////////////////////////////////////////////////////////////////////
status_e executeLogout (Session*);
////////////////////////////////////////////////////////////////////////////////
/// @brief changes the password
////////////////////////////////////////////////////////////////////////////////
status_e executePassword (Session*);
////////////////////////////////////////////////////////////////////////////////
/// @brief generates a new session
////////////////////////////////////////////////////////////////////////////////
void generateSession (Session*);
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- private variables
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup RestServer
/// @{
////////////////////////////////////////////////////////////////////////////////
private:
////////////////////////////////////////////////////////////////////////////////
/// @brief underlying user manager
////////////////////////////////////////////////////////////////////////////////
ApplicationAdminServer* _server;
};
}
}
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
#endif
// Local Variables:
// mode: outline-minor
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)"
// End:

View File

@ -227,7 +227,7 @@ typedef struct TRI_document_collection_s {
TRI_vector_pointer_t _indexes;
// .............................................................................
// this condition variable protects the _journals
// this condition variable protects the _journalsCondition
// .............................................................................
TRI_condition_t _journalsCondition;

View File

@ -98,22 +98,6 @@
"ERROR_QUERY_FAIL_CALLED" : { "code" : 1569, "message" : "FAIL(%s) called" },
"ERROR_QUERY_GEO_INDEX_MISSING" : { "code" : 1570, "message" : "no suitable geo index found for geo restriction on '%s'" },
"ERROR_CURSOR_NOT_FOUND" : { "code" : 1600, "message" : "cursor not found" },
"ERROR_SESSION_USERHANDLER_URL_INVALID" : { "code" : 1700, "message" : "expecting <prefix>/user/<username>" },
"ERROR_SESSION_USERHANDLER_CANNOT_CREATE_USER" : { "code" : 1701, "message" : "cannot create user" },
"ERROR_SESSION_USERHANDLER_ROLE_NOT_FOUND" : { "code" : 1702, "message" : "role not found" },
"ERROR_SESSION_USERHANDLER_NO_CREATE_PERMISSION" : { "code" : 1703, "message" : "no permission to create user with that role" },
"ERROR_SESSION_USERHANDLER_USER_NOT_FOUND" : { "code" : 1704, "message" : "user not found" },
"ERROR_SESSION_USERHANDLER_CANNOT_CHANGE_PW" : { "code" : 1705, "message" : "cannot manage password for user" },
"ERROR_SESSION_SESSIONHANDLER_URL_INVALID1" : { "code" : 1706, "message" : "expecting POST <prefix>/session" },
"ERROR_SESSION_SESSIONHANDLER_URL_INVALID2" : { "code" : 1707, "message" : "expecting GET <prefix>/session/<sid>" },
"ERROR_SESSION_SESSIONHANDLER_URL_INVALID3" : { "code" : 1708, "message" : "expecting PUT <prefix>/session/<sid>/<method>" },
"ERROR_SESSION_SESSIONHANDLER_URL_INVALID4" : { "code" : 1709, "message" : "expecting DELETE <prefix>/session/<sid>" },
"ERROR_SESSION_SESSIONHANDLER_SESSION_UNKNOWN" : { "code" : 1710, "message" : "unknown session" },
"ERROR_SESSION_SESSIONHANDLER_SESSION_NOT_BOUND" : { "code" : 1711, "message" : "session has not bound to user" },
"ERROR_SESSION_SESSIONHANDLER_CANNOT_LOGIN" : { "code" : 1712, "message" : "cannot login with session" },
"ERROR_SESSION_USERSHANDLER_INVALID_URL" : { "code" : 1713, "message" : "expecting GET <prefix>/users" },
"ERROR_SESSION_DIRECTORYSERVER_INVALID_URL" : { "code" : 1714, "message" : "expecting /directory/sessionvoc/<token>" },
"ERROR_SESSION_DIRECTORYSERVER_NOT_CONFIGURED" : { "code" : 1715, "message" : "directory server is not configured" },
"ERROR_KEYVALUE_INVALID_KEY" : { "code" : 1800, "message" : "invalid key declaration" },
"ERROR_KEYVALUE_KEY_EXISTS" : { "code" : 1801, "message" : "key already exists" },
"ERROR_KEYVALUE_KEY_NOT_FOUND" : { "code" : 1802, "message" : "key not found" },

View File

@ -99,22 +99,6 @@ static string JS_common_bootstrap_errors =
" \"ERROR_QUERY_FAIL_CALLED\" : { \"code\" : 1569, \"message\" : \"FAIL(%s) called\" }, \n"
" \"ERROR_QUERY_GEO_INDEX_MISSING\" : { \"code\" : 1570, \"message\" : \"no suitable geo index found for geo restriction on '%s'\" }, \n"
" \"ERROR_CURSOR_NOT_FOUND\" : { \"code\" : 1600, \"message\" : \"cursor not found\" }, \n"
" \"ERROR_SESSION_USERHANDLER_URL_INVALID\" : { \"code\" : 1700, \"message\" : \"expecting <prefix>/user/<username>\" }, \n"
" \"ERROR_SESSION_USERHANDLER_CANNOT_CREATE_USER\" : { \"code\" : 1701, \"message\" : \"cannot create user\" }, \n"
" \"ERROR_SESSION_USERHANDLER_ROLE_NOT_FOUND\" : { \"code\" : 1702, \"message\" : \"role not found\" }, \n"
" \"ERROR_SESSION_USERHANDLER_NO_CREATE_PERMISSION\" : { \"code\" : 1703, \"message\" : \"no permission to create user with that role\" }, \n"
" \"ERROR_SESSION_USERHANDLER_USER_NOT_FOUND\" : { \"code\" : 1704, \"message\" : \"user not found\" }, \n"
" \"ERROR_SESSION_USERHANDLER_CANNOT_CHANGE_PW\" : { \"code\" : 1705, \"message\" : \"cannot manage password for user\" }, \n"
" \"ERROR_SESSION_SESSIONHANDLER_URL_INVALID1\" : { \"code\" : 1706, \"message\" : \"expecting POST <prefix>/session\" }, \n"
" \"ERROR_SESSION_SESSIONHANDLER_URL_INVALID2\" : { \"code\" : 1707, \"message\" : \"expecting GET <prefix>/session/<sid>\" }, \n"
" \"ERROR_SESSION_SESSIONHANDLER_URL_INVALID3\" : { \"code\" : 1708, \"message\" : \"expecting PUT <prefix>/session/<sid>/<method>\" }, \n"
" \"ERROR_SESSION_SESSIONHANDLER_URL_INVALID4\" : { \"code\" : 1709, \"message\" : \"expecting DELETE <prefix>/session/<sid>\" }, \n"
" \"ERROR_SESSION_SESSIONHANDLER_SESSION_UNKNOWN\" : { \"code\" : 1710, \"message\" : \"unknown session\" }, \n"
" \"ERROR_SESSION_SESSIONHANDLER_SESSION_NOT_BOUND\" : { \"code\" : 1711, \"message\" : \"session has not bound to user\" }, \n"
" \"ERROR_SESSION_SESSIONHANDLER_CANNOT_LOGIN\" : { \"code\" : 1712, \"message\" : \"cannot login with session\" }, \n"
" \"ERROR_SESSION_USERSHANDLER_INVALID_URL\" : { \"code\" : 1713, \"message\" : \"expecting GET <prefix>/users\" }, \n"
" \"ERROR_SESSION_DIRECTORYSERVER_INVALID_URL\" : { \"code\" : 1714, \"message\" : \"expecting /directory/sessionvoc/<token>\" }, \n"
" \"ERROR_SESSION_DIRECTORYSERVER_NOT_CONFIGURED\" : { \"code\" : 1715, \"message\" : \"directory server is not configured\" }, \n"
" \"ERROR_KEYVALUE_INVALID_KEY\" : { \"code\" : 1800, \"message\" : \"invalid key declaration\" }, \n"
" \"ERROR_KEYVALUE_KEY_EXISTS\" : { \"code\" : 1801, \"message\" : \"key already exists\" }, \n"
" \"ERROR_KEYVALUE_KEY_NOT_FOUND\" : { \"code\" : 1802, \"message\" : \"key not found\" }, \n"

View File

@ -134,27 +134,6 @@ ERROR_QUERY_GEO_INDEX_MISSING,1570,"no suitable geo index found for geo restrict
ERROR_CURSOR_NOT_FOUND,1600,"cursor not found","Will be raised when a cursor is requested via its id but a cursor with that id cannot be found."
################################################################################
## Application Server
################################################################################
ERROR_SESSION_USERHANDLER_URL_INVALID,1700,"expecting <prefix>/user/<username>","TODO"
ERROR_SESSION_USERHANDLER_CANNOT_CREATE_USER,1701,"cannot create user","TODO"
ERROR_SESSION_USERHANDLER_ROLE_NOT_FOUND,1702,"role not found","TODO"
ERROR_SESSION_USERHANDLER_NO_CREATE_PERMISSION,1703,"no permission to create user with that role","TODO"
ERROR_SESSION_USERHANDLER_USER_NOT_FOUND,1704,"user not found","TODO"
ERROR_SESSION_USERHANDLER_CANNOT_CHANGE_PW,1705,"cannot manage password for user","TODO"
ERROR_SESSION_SESSIONHANDLER_URL_INVALID1,1706,"expecting POST <prefix>/session","TODO"
ERROR_SESSION_SESSIONHANDLER_URL_INVALID2,1707,"expecting GET <prefix>/session/<sid>","TODO"
ERROR_SESSION_SESSIONHANDLER_URL_INVALID3,1708,"expecting PUT <prefix>/session/<sid>/<method>","TODO"
ERROR_SESSION_SESSIONHANDLER_URL_INVALID4,1709,"expecting DELETE <prefix>/session/<sid>","TODO"
ERROR_SESSION_SESSIONHANDLER_SESSION_UNKNOWN,1710,"unknown session","TODO"
ERROR_SESSION_SESSIONHANDLER_SESSION_NOT_BOUND,1711,"session has not bound to user","TODO"
ERROR_SESSION_SESSIONHANDLER_CANNOT_LOGIN,1712,"cannot login with session","TODO"
ERROR_SESSION_USERSHANDLER_INVALID_URL,1713,"expecting GET <prefix>/users","TODO"
ERROR_SESSION_DIRECTORYSERVER_INVALID_URL,1714,"expecting /directory/sessionvoc/<token>","TODO"
ERROR_SESSION_DIRECTORYSERVER_NOT_CONFIGURED,1715,"directory server is not configured","TODO"
################################################################################
## Key value access
################################################################################

View File

@ -94,22 +94,6 @@ void TRI_InitialiseErrorMessages (void) {
REG_ERROR(ERROR_QUERY_FAIL_CALLED, "FAIL(%s) called");
REG_ERROR(ERROR_QUERY_GEO_INDEX_MISSING, "no suitable geo index found for geo restriction on '%s'");
REG_ERROR(ERROR_CURSOR_NOT_FOUND, "cursor not found");
REG_ERROR(ERROR_SESSION_USERHANDLER_URL_INVALID, "expecting <prefix>/user/<username>");
REG_ERROR(ERROR_SESSION_USERHANDLER_CANNOT_CREATE_USER, "cannot create user");
REG_ERROR(ERROR_SESSION_USERHANDLER_ROLE_NOT_FOUND, "role not found");
REG_ERROR(ERROR_SESSION_USERHANDLER_NO_CREATE_PERMISSION, "no permission to create user with that role");
REG_ERROR(ERROR_SESSION_USERHANDLER_USER_NOT_FOUND, "user not found");
REG_ERROR(ERROR_SESSION_USERHANDLER_CANNOT_CHANGE_PW, "cannot manage password for user");
REG_ERROR(ERROR_SESSION_SESSIONHANDLER_URL_INVALID1, "expecting POST <prefix>/session");
REG_ERROR(ERROR_SESSION_SESSIONHANDLER_URL_INVALID2, "expecting GET <prefix>/session/<sid>");
REG_ERROR(ERROR_SESSION_SESSIONHANDLER_URL_INVALID3, "expecting PUT <prefix>/session/<sid>/<method>");
REG_ERROR(ERROR_SESSION_SESSIONHANDLER_URL_INVALID4, "expecting DELETE <prefix>/session/<sid>");
REG_ERROR(ERROR_SESSION_SESSIONHANDLER_SESSION_UNKNOWN, "unknown session");
REG_ERROR(ERROR_SESSION_SESSIONHANDLER_SESSION_NOT_BOUND, "session has not bound to user");
REG_ERROR(ERROR_SESSION_SESSIONHANDLER_CANNOT_LOGIN, "cannot login with session");
REG_ERROR(ERROR_SESSION_USERSHANDLER_INVALID_URL, "expecting GET <prefix>/users");
REG_ERROR(ERROR_SESSION_DIRECTORYSERVER_INVALID_URL, "expecting /directory/sessionvoc/<token>");
REG_ERROR(ERROR_SESSION_DIRECTORYSERVER_NOT_CONFIGURED, "directory server is not configured");
REG_ERROR(ERROR_KEYVALUE_INVALID_KEY, "invalid key declaration");
REG_ERROR(ERROR_KEYVALUE_KEY_EXISTS, "key already exists");
REG_ERROR(ERROR_KEYVALUE_KEY_NOT_FOUND, "key not found");

View File

@ -203,38 +203,6 @@ extern "C" {
/// - 1600: @CODE{cursor not found}
/// Will be raised when a cursor is requested via its id but a cursor with
/// that id cannot be found.
/// - 1700: @CODE{expecting \<prefix\>/user/\<username\>}
/// TODO
/// - 1701: @CODE{cannot create user}
/// TODO
/// - 1702: @CODE{role not found}
/// TODO
/// - 1703: @CODE{no permission to create user with that role}
/// TODO
/// - 1704: @CODE{user not found}
/// TODO
/// - 1705: @CODE{cannot manage password for user}
/// TODO
/// - 1706: @CODE{expecting POST \<prefix\>/session}
/// TODO
/// - 1707: @CODE{expecting GET \<prefix\>/session/\<sid\>}
/// TODO
/// - 1708: @CODE{expecting PUT \<prefix\>/session/\<sid\>/\<method\>}
/// TODO
/// - 1709: @CODE{expecting DELETE \<prefix\>/session/\<sid\>}
/// TODO
/// - 1710: @CODE{unknown session}
/// TODO
/// - 1711: @CODE{session has not bound to user}
/// TODO
/// - 1712: @CODE{cannot login with session}
/// TODO
/// - 1713: @CODE{expecting GET \<prefix\>/users}
/// TODO
/// - 1714: @CODE{expecting /directory/sessionvoc/\<token\>}
/// TODO
/// - 1715: @CODE{directory server is not configured}
/// TODO
/// - 1800: @CODE{invalid key declaration}
/// Will be raised when an invalid key specification is passed to the server
/// - 1801: @CODE{key already exists}
@ -1196,166 +1164,6 @@ void TRI_InitialiseErrorMessages (void);
#define TRI_ERROR_CURSOR_NOT_FOUND (1600)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1700: ERROR_SESSION_USERHANDLER_URL_INVALID
///
/// expecting \<prefix\>/user/\<username\>
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_USERHANDLER_URL_INVALID (1700)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1701: ERROR_SESSION_USERHANDLER_CANNOT_CREATE_USER
///
/// cannot create user
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_USERHANDLER_CANNOT_CREATE_USER (1701)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1702: ERROR_SESSION_USERHANDLER_ROLE_NOT_FOUND
///
/// role not found
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_USERHANDLER_ROLE_NOT_FOUND (1702)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1703: ERROR_SESSION_USERHANDLER_NO_CREATE_PERMISSION
///
/// no permission to create user with that role
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_USERHANDLER_NO_CREATE_PERMISSION (1703)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1704: ERROR_SESSION_USERHANDLER_USER_NOT_FOUND
///
/// user not found
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_USERHANDLER_USER_NOT_FOUND (1704)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1705: ERROR_SESSION_USERHANDLER_CANNOT_CHANGE_PW
///
/// cannot manage password for user
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_USERHANDLER_CANNOT_CHANGE_PW (1705)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1706: ERROR_SESSION_SESSIONHANDLER_URL_INVALID1
///
/// expecting POST \<prefix\>/session
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_SESSIONHANDLER_URL_INVALID1 (1706)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1707: ERROR_SESSION_SESSIONHANDLER_URL_INVALID2
///
/// expecting GET \<prefix\>/session/\<sid\>
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_SESSIONHANDLER_URL_INVALID2 (1707)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1708: ERROR_SESSION_SESSIONHANDLER_URL_INVALID3
///
/// expecting PUT \<prefix\>/session/\<sid\>/\<method\>
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_SESSIONHANDLER_URL_INVALID3 (1708)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1709: ERROR_SESSION_SESSIONHANDLER_URL_INVALID4
///
/// expecting DELETE \<prefix\>/session/\<sid\>
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_SESSIONHANDLER_URL_INVALID4 (1709)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1710: ERROR_SESSION_SESSIONHANDLER_SESSION_UNKNOWN
///
/// unknown session
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_SESSIONHANDLER_SESSION_UNKNOWN (1710)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1711: ERROR_SESSION_SESSIONHANDLER_SESSION_NOT_BOUND
///
/// session has not bound to user
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_SESSIONHANDLER_SESSION_NOT_BOUND (1711)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1712: ERROR_SESSION_SESSIONHANDLER_CANNOT_LOGIN
///
/// cannot login with session
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_SESSIONHANDLER_CANNOT_LOGIN (1712)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1713: ERROR_SESSION_USERSHANDLER_INVALID_URL
///
/// expecting GET \<prefix\>/users
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_USERSHANDLER_INVALID_URL (1713)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1714: ERROR_SESSION_DIRECTORYSERVER_INVALID_URL
///
/// expecting /directory/sessionvoc/\<token\>
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_DIRECTORYSERVER_INVALID_URL (1714)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1715: ERROR_SESSION_DIRECTORYSERVER_NOT_CONFIGURED
///
/// directory server is not configured
///
/// TODO
////////////////////////////////////////////////////////////////////////////////
#define TRI_ERROR_SESSION_DIRECTORYSERVER_NOT_CONFIGURED (1715)
////////////////////////////////////////////////////////////////////////////////
/// @brief 1800: ERROR_KEYVALUE_INVALID_KEY
///