1 | <?php |
||
14 | trait TokenEntityTrait |
||
15 | { |
||
16 | use ScopeEntityTrait; |
||
17 | |||
18 | /** |
||
19 | * @var \DateTime |
||
20 | */ |
||
21 | protected $expiryDateTime; |
||
22 | |||
23 | /** |
||
24 | * @var string|int|null |
||
25 | */ |
||
26 | protected $userIdentifier; |
||
27 | |||
28 | /** |
||
29 | * @var ClientEntityInterface |
||
30 | */ |
||
31 | protected $client; |
||
32 | |||
33 | /** |
||
34 | * Get the token's expiry date time. |
||
35 | * |
||
36 | * @return \DateTime |
||
37 | */ |
||
38 | 9 | public function getExpiryDateTime() |
|
42 | |||
43 | /** |
||
44 | * Set the date time when the token expires. |
||
45 | * |
||
46 | * @param \DateTime $dateTime |
||
47 | */ |
||
48 | 30 | public function setExpiryDateTime(\DateTime $dateTime) |
|
52 | |||
53 | /** |
||
54 | * Set the identifier of the user associated with the token. |
||
55 | * |
||
56 | * @param string|int|null $identifier The identifier of the user |
||
57 | */ |
||
58 | 28 | public function setUserIdentifier($identifier) |
|
62 | |||
63 | /** |
||
64 | * Get the token user's identifier. |
||
65 | * |
||
66 | * @return string|int|null |
||
67 | */ |
||
68 | 12 | public function getUserIdentifier() |
|
72 | |||
73 | /** |
||
74 | * Get the client that the token was issued to. |
||
75 | * |
||
76 | * @return ClientEntityInterface |
||
77 | */ |
||
78 | 12 | public function getClient() |
|
82 | |||
83 | /** |
||
84 | * Set the client that the token was issued to. |
||
85 | * |
||
86 | * @param ClientEntityInterface $client |
||
87 | */ |
||
88 | 30 | public function setClient(ClientEntityInterface $client) |
|
92 | } |
||
93 |