diff options
| author | Daniel Weipert <git@mail.dweipert.de> | 2025-12-13 16:27:53 +0100 |
|---|---|---|
| committer | Daniel Weipert <git@mail.dweipert.de> | 2025-12-13 16:27:53 +0100 |
| commit | 2386148b8f048ba40d9f26cc97898bdcdc778ea2 (patch) | |
| tree | 48ca45de3dc6133cb0225eba8c5917f813082b2b /matrix-specification/Data/AuthenticationData.php | |
| parent | b19a8f63ad727a3633885d3f2b81edf8181a53b9 (diff) | |
Diffstat (limited to 'matrix-specification/Data/AuthenticationData.php')
| -rw-r--r-- | matrix-specification/Data/AuthenticationData.php | 24 |
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, + ]; + } +} |
