summaryrefslogtreecommitdiff
path: root/matrix-specification/Data/AuthenticationData.php
blob: 64fdd9575cb0820f15b94b7a266780e9fb396ed1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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,
    ];
  }
}