1 | <?php |
||
16 | class AccessTokenRepository implements AccessTokenRepositoryInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var Registry |
||
20 | */ |
||
21 | private $registry; |
||
22 | |||
23 | /** |
||
24 | * @param Registry $registry |
||
25 | */ |
||
26 | public function __construct(Registry $registry) |
||
30 | |||
31 | /** |
||
32 | * @param ClientEntityInterface $clientEntity |
||
33 | * @param ScopeEntityInterface[] $scopes |
||
34 | * @param string|null $userIdentifier |
||
35 | * @return AccessTokenEntity |
||
36 | */ |
||
37 | public function getNewToken(ClientEntityInterface $clientEntity, array $scopes, $userIdentifier = null) |
||
47 | |||
48 | /** |
||
49 | * @param AccessTokenEntityInterface $accessTokenEntity |
||
50 | * @throws ORMInvalidArgumentException |
||
51 | * @throws OptimisticLockException |
||
52 | */ |
||
53 | public function persistNewAccessToken(AccessTokenEntityInterface $accessTokenEntity) |
||
61 | |||
62 | /** |
||
63 | * @param string $tokenId |
||
64 | * @throws InvalidStateException |
||
65 | * @throws QueryException |
||
66 | * @throws OptimisticLockException |
||
67 | */ |
||
68 | public function revokeAccessToken($tokenId) |
||
77 | |||
78 | /** |
||
79 | * @param string $tokenId |
||
80 | * @return bool |
||
81 | * @throws InvalidStateException |
||
82 | * @throws QueryException |
||
83 | */ |
||
84 | public function isAccessTokenRevoked($tokenId) |
||
90 | |||
91 | /** |
||
92 | * @return AccessTokenQuery |
||
93 | */ |
||
94 | protected function createQuery(): AccessTokenQuery |
||
98 | } |
||
99 |