public function RevocableTokenRepositoryTrait::isRevoked in Simple OAuth (OAuth2) & OpenID Connect 8.4
Same name and namespace in other branches
- 8.2 src/Repositories/RevocableTokenRepositoryTrait.php \Drupal\simple_oauth\Repositories\RevocableTokenRepositoryTrait::isRevoked()
- 8.3 src/Repositories/RevocableTokenRepositoryTrait.php \Drupal\simple_oauth\Repositories\RevocableTokenRepositoryTrait::isRevoked()
- 5.x src/Repositories/RevocableTokenRepositoryTrait.php \Drupal\simple_oauth\Repositories\RevocableTokenRepositoryTrait::isRevoked()
3 calls to RevocableTokenRepositoryTrait::isRevoked()
- AccessTokenRepository::isAccessTokenRevoked in src/
Repositories/ AccessTokenRepository.php - AuthCodeRepository::isAuthCodeRevoked in src/
Repositories/ AuthCodeRepository.php - RefreshTokenRepository::isRefreshTokenRevoked in src/
Repositories/ RefreshTokenRepository.php
File
- src/
Repositories/ RevocableTokenRepositoryTrait.php, line 88
Class
- RevocableTokenRepositoryTrait
- Common methods for token repositories on different grants.
Namespace
Drupal\simple_oauth\RepositoriesCode
public function isRevoked($token_id) {
if (!($tokens = $this->entityTypeManager
->getStorage(static::$entityTypeId)
->loadByProperties([
'value' => $token_id,
]))) {
return TRUE;
}
/** @var \Drupal\simple_oauth\Entity\Oauth2TokenInterface $token */
$token = reset($tokens);
return $token
->isRevoked();
}