1 | <?php |
||
10 | class AuthCode implements AuthCodeEntityInterface |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * @var null|string |
||
15 | */ |
||
16 | protected $redirectUri; |
||
17 | |||
18 | /** |
||
19 | * @var ScopeEntityInterface[] |
||
20 | */ |
||
21 | protected $scopes = []; |
||
22 | |||
23 | /** |
||
24 | * @var \DateTime |
||
25 | */ |
||
26 | protected $expiryDateTime; |
||
27 | |||
28 | /** |
||
29 | * @var string|int |
||
30 | */ |
||
31 | protected $userIdentifier; |
||
32 | |||
33 | /** |
||
34 | * @var ClientEntityInterface |
||
35 | */ |
||
36 | protected $client; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $identifier; |
||
42 | |||
43 | /** |
||
44 | * @return mixed |
||
45 | */ |
||
46 | public function getIdentifier() |
||
50 | |||
51 | /** |
||
52 | * @param mixed $identifier |
||
53 | */ |
||
54 | public function setIdentifier($identifier) |
||
58 | |||
59 | /** |
||
60 | * Associate a scope with the token. |
||
61 | * |
||
62 | * @param ScopeEntityInterface $scope |
||
63 | */ |
||
64 | public function addScope(ScopeEntityInterface $scope) |
||
68 | |||
69 | /** |
||
70 | * Return an array of scopes associated with the token. |
||
71 | * |
||
72 | * @return ScopeEntityInterface[] |
||
73 | */ |
||
74 | public function getScopes() |
||
78 | |||
79 | /** |
||
80 | * Get the token's expiry date time. |
||
81 | * |
||
82 | * @return \DateTime |
||
83 | */ |
||
84 | public function getExpiryDateTime() |
||
88 | |||
89 | /** |
||
90 | * Set the date time when the token expires. |
||
91 | * |
||
92 | * @param DateTime $dateTime |
||
93 | */ |
||
94 | public function setExpiryDateTime(DateTime $dateTime) |
||
98 | |||
99 | /** |
||
100 | * Set the identifier of the user associated with the token. |
||
101 | * |
||
102 | * @param string|int $identifier The identifier of the user |
||
103 | */ |
||
104 | public function setUserIdentifier($identifier) |
||
108 | |||
109 | /** |
||
110 | * Get the token user's identifier. |
||
111 | * |
||
112 | * @return string|int |
||
113 | */ |
||
114 | public function getUserIdentifier() |
||
118 | |||
119 | /** |
||
120 | * Get the client that the token was issued to. |
||
121 | * |
||
122 | * @return ClientEntityInterface |
||
123 | */ |
||
124 | public function getClient() |
||
128 | |||
129 | /** |
||
130 | * Set the client that the token was issued to. |
||
131 | * |
||
132 | * @param ClientEntityInterface $client |
||
133 | */ |
||
134 | public function setClient(ClientEntityInterface $client) |
||
138 | |||
139 | /** |
||
140 | * @return string |
||
141 | */ |
||
142 | public function getRedirectUri() |
||
146 | |||
147 | /** |
||
148 | * @param string $uri |
||
149 | */ |
||
150 | public function setRedirectUri($uri) |
||
154 | } |