From 2386148b8f048ba40d9f26cc97898bdcdc778ea2 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 13 Dec 2025 16:27:53 +0100 Subject: matrix specification split --- .../Responses/ClientRegisterPostResponse.php | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 matrix-specification/Responses/ClientRegisterPostResponse.php (limited to 'matrix-specification/Responses/ClientRegisterPostResponse.php') diff --git a/matrix-specification/Responses/ClientRegisterPostResponse.php b/matrix-specification/Responses/ClientRegisterPostResponse.php new file mode 100644 index 0000000..6ed65ce --- /dev/null +++ b/matrix-specification/Responses/ClientRegisterPostResponse.php @@ -0,0 +1,39 @@ +getBody(); + if ($requestBody["inhibit_login"] === false) { + # TODO: validate + } + } + + public function getBody(): array + { + return array_filter([ + "access_token" => $this->accessToken, + "device_id" => $this->deviceId, + "expires_in_ms" => $this->expiresInMilliseconds, + "home_server" => $this->homeServer, + "refresh_token" => $this->refreshToken, + "user_id" => $this->userId, + ], fn ($value) => ! is_null($value)); + } +} -- cgit v1.2.3