1 | <?php |
||
21 | abstract class AbstractAccessToken implements AccessToken |
||
22 | { |
||
23 | /** |
||
24 | * @var \DateTimeImmutable |
||
25 | */ |
||
26 | private $expiresAt; |
||
27 | |||
28 | /** |
||
29 | * @var ResourceOwnerId |
||
30 | */ |
||
31 | private $resourceOwnerId; |
||
32 | |||
33 | /** |
||
34 | * @var ClientId |
||
35 | */ |
||
36 | private $clientId; |
||
37 | |||
38 | /** |
||
39 | * @var DataBag |
||
40 | */ |
||
41 | private $parameter; |
||
42 | |||
43 | /** |
||
44 | * @var DataBag |
||
45 | */ |
||
46 | private $metadata; |
||
47 | |||
48 | /** |
||
49 | * @var bool |
||
50 | */ |
||
51 | private $revoked; |
||
52 | |||
53 | /** |
||
54 | * @var ResourceServerId|null |
||
55 | */ |
||
56 | private $resourceServerId; |
||
57 | |||
58 | public function __construct(ClientId $clientId, ResourceOwnerId $resourceOwnerId, \DateTimeImmutable $expiresAt, DataBag $parameter, DataBag $metadata, ?ResourceServerId $resourceServerId) |
||
68 | |||
69 | public function getExpiresAt(): \DateTimeImmutable |
||
73 | |||
74 | public function hasExpired(): bool |
||
78 | |||
79 | public function getResourceOwnerId(): ResourceOwnerId |
||
83 | |||
84 | public function getClientId(): ClientId |
||
88 | |||
89 | public function getParameter(): DataBag |
||
93 | |||
94 | public function getMetadata(): DataBag |
||
98 | |||
99 | public function isRevoked(): bool |
||
103 | |||
104 | public function markAsRevoked(): void |
||
108 | |||
109 | public function getResourceServerId(): ?ResourceServerId |
||
113 | |||
114 | public function getExpiresIn(): int |
||
118 | |||
119 | public function jsonSerialize() |
||
135 | |||
136 | public function getResponseData(): array |
||
144 | } |
||
145 |