1 | <?php |
||
15 | class AuthCodes extends \Nip\Records\RecordManager implements AuthCodeRepositoryInterface |
||
16 | { |
||
17 | /** |
||
18 | * Creates a new AuthCode |
||
19 | * |
||
20 | * @return AuthCodeEntityInterface |
||
21 | */ |
||
22 | public function getNewAuthCode() |
||
26 | |||
27 | /** |
||
28 | * Persists a new auth code to permanent storage. |
||
29 | * |
||
30 | * @param AuthCodeEntityInterface $authCodeEntity |
||
31 | * |
||
32 | * @throws UniqueTokenIdentifierConstraintViolationException |
||
33 | */ |
||
34 | public function persistNewAuthCode(AuthCodeEntityInterface $authCodeEntity) |
||
38 | |||
39 | /** |
||
40 | * Revoke an auth code. |
||
41 | * |
||
42 | * @param string $codeId |
||
43 | */ |
||
44 | public function revokeAuthCode($codeId) |
||
48 | |||
49 | /** |
||
50 | * Check if the auth code has been revoked. |
||
51 | * |
||
52 | * @param string $codeId |
||
53 | * |
||
54 | * @return bool Return true if this code has been revoked |
||
55 | */ |
||
56 | public function isAuthCodeRevoked($codeId) |
||
60 | |||
61 | /** @noinspection PhpMissingParentCallCommonInspection |
||
62 | * @inheritDoc |
||
63 | */ |
||
64 | protected function generateTable() |
||
68 | } |
||
69 |