summaryrefslogtreecommitdiff
path: root/matrix-specification/Data/AuthenticationData.php
diff options
context:
space:
mode:
Diffstat (limited to 'matrix-specification/Data/AuthenticationData.php')
-rw-r--r--matrix-specification/Data/AuthenticationData.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/matrix-specification/Data/AuthenticationData.php b/matrix-specification/Data/AuthenticationData.php
new file mode 100644
index 0000000..64fdd95
--- /dev/null
+++ b/matrix-specification/Data/AuthenticationData.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Matrix\Data;
+
+class AuthenticationData implements \JsonSerializable
+{
+ public function __construct(
+ private ?string $session = null,
+ private ?string $type = null,
+ )
+ {
+ # TODO: throw for session and type
+ # TODO: throw for keys dependent on login type
+ # throw new \InvalidArgumentException("at least one is required");
+ }
+
+ public function jsonSerialize(): array
+ {
+ return [
+ "session" => $this->session,
+ "type" => $this->type,
+ ];
+ }
+}