servnest/sftpgo-auth.php
Miraty e3af4c946d router.php + process form before display
The webservers now need to send every request to router.php, which will call appropriate files.

Forms will be treated before being displayed.
2022-09-01 04:21:17 +02:00

23 lines
411 B
PHP

<?php
require "router.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);
}