This commit is contained in:
xinatorus
2020-05-25 21:21:38 +02:00
parent 254a2cf97a
commit c961bc2c88
4 changed files with 10 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ class ApiController {
if (isset($_SERVER['HTTP_AUTHORIZATION'])) {
// TODO: call appropriate class/method
$authManager = new AuthManager();
$this->authenticated = $authManager>validateToken($_SERVER['HTTP_AUTHORIZATION']);
$this->authenticated = $authManager->validateToken($_SERVER['HTTP_AUTHORIZATION']);
if(!$this->authenticated){
throw new Exception("Authorization required", 401);
}