2022-05-19 14:59:32 +00:00
|
|
|
<?php
|
|
|
|
|
2022-09-01 02:21:17 +00:00
|
|
|
require "router.php";
|
2022-05-19 14:59:32 +00:00
|
|
|
|
|
|
|
$authData = json_decode(file_get_contents("php://input"), true);
|
|
|
|
|
2022-09-03 16:56:40 +00:00
|
|
|
if (userExist($authData['username']) === true AND checkPassword($authData['username'], $authData['password']) === true) {
|
2022-06-28 20:08:34 +00:00
|
|
|
echo '
|
|
|
|
{
|
|
|
|
"status": 1,
|
|
|
|
"username": "' . $authData['username'] . '",
|
|
|
|
"quota_size": ' . CONF['ht']['user_quota'] . ',
|
|
|
|
"permissions": {
|
|
|
|
"/": [
|
|
|
|
"*"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
';
|
2022-05-19 14:59:32 +00:00
|
|
|
http_response_code(200);
|
|
|
|
} else {
|
|
|
|
http_response_code(403);
|
|
|
|
}
|