mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-06-18 16:18:04 +00:00
Handles user login and logout
This commit is contained in:
@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user