芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/myvyralapp.com/bck/vendor/laravel/passport/src/Bridge/AccessTokenRepository.php
events = $events; $this->tokenRepository = $tokenRepository; } /** * {@inheritdoc} */ public function getNewToken(ClientEntityInterface $clientEntity, array $scopes, $userIdentifier = null) { return new AccessToken($userIdentifier, $scopes, $clientEntity); } /** * {@inheritdoc} */ public function persistNewAccessToken(AccessTokenEntityInterface $accessTokenEntity) { $this->tokenRepository->create([ 'id' => $accessTokenEntity->getIdentifier(), 'user_id' => $accessTokenEntity->getUserIdentifier(), 'client_id' => $accessTokenEntity->getClient()->getIdentifier(), 'scopes' => $this->scopesToArray($accessTokenEntity->getScopes()), 'revoked' => false, 'created_at' => new DateTime, 'updated_at' => new DateTime, 'expires_at' => $accessTokenEntity->getExpiryDateTime(), ]); $this->events->dispatch(new AccessTokenCreated( $accessTokenEntity->getIdentifier(), $accessTokenEntity->getUserIdentifier(), $accessTokenEntity->getClient()->getIdentifier() )); } /** * {@inheritdoc} */ public function revokeAccessToken($tokenId) { $this->tokenRepository->revokeAccessToken($tokenId); } /** * {@inheritdoc} */ public function isAccessTokenRevoked($tokenId) { return $this->tokenRepository->isAccessTokenRevoked($tokenId); } }