Handles user login and logout

This commit is contained in:
Pierre
2017-05-17 14:43:12 +02:00
parent 3b0272a196
commit 033da4e0e3
7 changed files with 409 additions and 3 deletions

View File

@ -27,6 +27,14 @@ header("Access-Control-Allow-Origin: *");
if(!isset($_GET["format"]))
$_GET['format'] = "json";
//Check tokens
if($cs->config->get("site_mode") == "debug"){
$_POST['serviceName'] = "testService";
$_POST['serviceToken'] = "testPasswd";
}
if(!$cs->tokens->checkRequestTokens())
Rest_fatal_error(401, "Please check your tokens!");
/**
* Handle Rest requests
*/