Niver's web interface
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
416 B

<?php
require "common/init.php";
$authData = json_decode(file_get_contents("php://input"), true);
if (checkPassword($authData['username'], $authData['password']) === true) {
echo '
{
"status": 1,
"username": "' . $authData['username'] . '",
"quota_size": ' . CONF['ht']['user_quota'] . ',
"permissions": {
"/": [
"*"
]
}
}
';
http_response_code(200);
} else {
http_response_code(403);
}