reformat and cleanup; Add auth error to response on internal login(debug)
This commit is contained in:
@@ -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");
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user