mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
auth fix
This commit is contained in:
1 parent
254a2cf97a
commit
c961bc2c88
4 files changed
+10
-5
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user