1 | <?php |
||
10 | class AccessToken |
||
11 | { |
||
12 | private $accessToken; |
||
13 | private $expiresAt; |
||
14 | private $clientId; |
||
15 | private $resourceOwner; |
||
16 | private $scopes; |
||
17 | |||
18 | public function __construct($token, \DateTimeImmutable $expiresAt, $clientId, ResourceOwner $resourceOwner = null, array $scopes = []) |
||
19 | { |
||
20 | Ensure::string($token); |
||
21 | |||
22 | $this->accessToken = $token; |
||
23 | $this->expiresAt = $expiresAt; |
||
24 | $this->clientId = $clientId; |
||
25 | $this->resourceOwner = $resourceOwner; |
||
26 | $this->scopes = $scopes; |
||
27 | } |
||
28 | |||
29 | public function getToken() |
||
33 | |||
34 | public function getExpiresAt() |
||
38 | |||
39 | public function getScopes() |
||
43 | |||
44 | public function getClientId() |
||
48 | |||
49 | public function getResourceOwner() |
||
53 | |||
54 | public function isExpired() |
||
58 | } |
||
59 |