reformat and cleanup; Add auth error to response on internal login(debug)

This commit is contained in:
2018-03-08 11:46:33 +01:00
parent d5f2b05d4d
commit 6b98ac4ae7
3 changed files with 20 additions and 30 deletions

View File

@@ -15,14 +15,6 @@ abstract class LoginRequester {
$loginRequester = LoginRequester::UNDEFINED;
try {
$input = json_decode('
{
"user": {
"id": "@matrix.id.of.the.user:example.com",
"password": "passwordOfTheUser"
}
}
',true);
$inputJSON = file_get_contents('php://input');
$input = json_decode($inputJSON, TRUE);
$mxid = NULL;
@@ -101,7 +93,7 @@ try {
}
} catch (Exception $e) {
error_log("Auth failed with error: " . $e->getMessage());
//$response["auth"]["error"] = $e->getMessage();
$response["auth"]["error"] = $e->getMessage();
}
print (json_encode($response, JSON_PRETTY_PRINT) . "\n");
?>
?>