Second implementation with matrix_synapse_rest_auth #2

Merged
krombel merged 51 commits from second_implementation into master 2018-03-19 13:57:16 +01:00
3 changed files with 20 additions and 30 deletions
Showing only changes of commit 6b98ac4ae7 - Show all commits

View File

@@ -127,9 +127,7 @@ class MatrixMessage
private $message;
function __construct() {
$this->message = array(
"msgtype" => "m.notice",
);
$this->message = ["msgtype" => "m.notice"];
}
function set_type($msgtype) {

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");
?>