1 | <?php |
||
19 | class AuthCodeEntity implements AuthCodeEntityInterface |
||
20 | { |
||
21 | /** |
||
22 | * @ORM\Id() |
||
23 | * @ORM\GeneratedValue() |
||
24 | * @ORM\Column(type="integer") |
||
25 | * @var int |
||
26 | */ |
||
27 | private $id; |
||
28 | |||
29 | /** |
||
30 | * @ORM\Column(type="boolean") |
||
31 | * @var bool |
||
32 | */ |
||
33 | private $revoked = false; |
||
34 | |||
35 | /** |
||
36 | * @ORM\Column(type="text") |
||
37 | * @var string |
||
38 | */ |
||
39 | private $redirectUri; |
||
40 | |||
41 | /** |
||
42 | * @ORM\Column(type="string", length=80, unique=true) |
||
43 | * @var string |
||
44 | */ |
||
45 | private $identifier; |
||
46 | |||
47 | /** |
||
48 | * @ORM\Column(type="datetimetz") |
||
49 | * @var \DateTime |
||
50 | */ |
||
51 | private $expiryDateTime; |
||
52 | |||
53 | /** |
||
54 | * @ORM\Column(type="text") |
||
55 | * @var string |
||
56 | */ |
||
57 | private $userIdentifier; |
||
58 | |||
59 | /** |
||
60 | * @ORM\ManyToOne(targetEntity="Lookyman\NetteOAuth2Server\Storage\Doctrine\Client\ClientEntity") |
||
61 | * @ORM\JoinColumn(nullable=false) |
||
62 | * @var ClientEntity |
||
63 | */ |
||
64 | private $client; |
||
65 | |||
66 | /** |
||
67 | * @ORM\ManyToMany(targetEntity="Lookyman\NetteOAuth2Server\Storage\Doctrine\Scope\ScopeEntity") |
||
68 | * @ORM\JoinTable(name="auth_code_scope") |
||
69 | * @var Collection of ScopeEntity |
||
70 | */ |
||
71 | private $scopes; |
||
72 | |||
73 | public function __construct() |
||
74 | { |
||
75 | $this->scopes = new ArrayCollection(); |
||
76 | } |
||
77 | |||
78 | /** |
||
79 | * @return int|null |
||
80 | */ |
||
81 | public function getId() |
||
85 | |||
86 | public function __clone() |
||
90 | |||
91 | /** |
||
92 | * @return bool |
||
93 | */ |
||
94 | public function isRevoked(): bool |
||
98 | |||
99 | /** |
||
100 | * @param bool $revoked |
||
101 | */ |
||
102 | public function setRevoked(bool $revoked) |
||
106 | |||
107 | /** |
||
108 | * @return string |
||
109 | */ |
||
110 | public function getRedirectUri() |
||
114 | |||
115 | /** |
||
116 | * @param string $uri |
||
117 | */ |
||
118 | public function setRedirectUri($uri) |
||
122 | |||
123 | /** |
||
124 | * @return string |
||
125 | */ |
||
126 | public function getIdentifier() |
||
130 | |||
131 | /** |
||
132 | * @param string $identifier |
||
133 | */ |
||
134 | public function setIdentifier($identifier) |
||
138 | |||
139 | /** |
||
140 | * @return \DateTime |
||
141 | */ |
||
142 | public function getExpiryDateTime() |
||
146 | |||
147 | /** |
||
148 | * @param \DateTime $dateTime |
||
149 | */ |
||
150 | public function setExpiryDateTime(\DateTime $dateTime) |
||
154 | |||
155 | /** |
||
156 | * @param string $identifier |
||
157 | */ |
||
158 | public function setUserIdentifier($identifier) |
||
162 | |||
163 | /** |
||
164 | * @return string |
||
165 | */ |
||
166 | public function getUserIdentifier() |
||
170 | |||
171 | /** |
||
172 | * @return ClientEntityInterface |
||
173 | */ |
||
174 | public function getClient() |
||
178 | |||
179 | /** |
||
180 | * @param ClientEntityInterface $client |
||
181 | */ |
||
182 | public function setClient(ClientEntityInterface $client) |
||
188 | |||
189 | /** |
||
190 | * @param ScopeEntityInterface $scope |
||
191 | */ |
||
192 | public function addScope(ScopeEntityInterface $scope) |
||
198 | |||
199 | /** |
||
200 | * @return ScopeEntityInterface[] |
||
201 | */ |
||
202 | public function getScopes() |
||
206 | } |
||
207 |