2022-05-19 14:59:32 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require "common/init.php";
|
2022-06-07 15:58:46 +00:00
|
|
|
require "fn/auth.php";
|
2022-05-19 14:59:32 +00:00
|
|
|
|
|
|
|
$authData = json_decode(file_get_contents("php://input"), true);
|
|
|
|
$user = json_decode($authData['user'], true);
|
|
|
|
|
|
|
|
if (checkPassword($authData['username'], $authData['password']) === true) {
|
|
|
|
echo '{"status":1,"username":"' . $authData['username'] . '","permissions":{"/":["*"]}}';
|
|
|
|
http_response_code(200);
|
|
|
|
} else {
|
|
|
|
http_response_code(403);
|
|
|
|
}
|