From b08047ba485f86038f33175162943c0a9878ab1a Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Fri, 19 Sep 2025 17:03:47 +0200 Subject: add separate matrix specification package --- .../Requests/ClientLoginPostRequest.php | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 matrix-specification/Requests/ClientLoginPostRequest.php (limited to 'matrix-specification/Requests/ClientLoginPostRequest.php') diff --git a/matrix-specification/Requests/ClientLoginPostRequest.php b/matrix-specification/Requests/ClientLoginPostRequest.php new file mode 100644 index 0000000..d17c558 --- /dev/null +++ b/matrix-specification/Requests/ClientLoginPostRequest.php @@ -0,0 +1,53 @@ + $this->deviceId, + "identifier" => $this->identifier, + "initial_device_display_name" => $this->initialDeviceDisplayName, + "refresh_token" => $this->refreshToken, + "type" => $this->type, + ]; + + $request += match ($this->type) { + LoginType::PASSWORD => [ + "password" => $this->password, + ], + + LoginType::TOKEN => [ + "token" => $this->token, + ], + + default => [], + }; + + return array_filter($request, "is_null"); + } +} -- cgit v1.2.3