1 | <?php |
||
13 | class AccessTokenRepository implements AccessTokenRepositoryInterface |
||
14 | { |
||
15 | /** |
||
16 | * {@inheritdoc} |
||
17 | */ |
||
18 | public function persistNewAccessToken(AccessTokenEntityInterface $accessTokenEntity) |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public function getNewToken(ClientEntityInterface $clientEntity, array $scopes, $userIdentifier = null) |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | public function revokeAccessToken($tokenId) |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function isAccessTokenRevoked($tokenId): bool |
||
69 | |||
70 | /** |
||
71 | * Find the Token for passed id. |
||
72 | * |
||
73 | * @param string $tokenId The id of the token. |
||
74 | * |
||
75 | * @return AccessToken|null |
||
76 | */ |
||
77 | public function findToken(string $tokenId): ?AccessToken |
||
81 | |||
82 | /** |
||
83 | * Delete tokens which have expired. |
||
84 | * |
||
85 | * @param integer $days |
||
86 | */ |
||
87 | public function deleteExpiredTokens($days = 1) |
||
95 | } |
||
96 |