public function RevocableTokenRepositoryTrait::isRevoked in Simple OAuth (OAuth2) & OpenID Connect 8.3
Same name and namespace in other branches
- 8.4 src/Repositories/RevocableTokenRepositoryTrait.php \Drupal\simple_oauth\Repositories\RevocableTokenRepositoryTrait::isRevoked()
- 8.2 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 simple_oauth_extras/
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::$entity_type_id)
->loadByProperties([
'value' => $token_id,
]))) {
return TRUE;
}
/** @var \Drupal\simple_oauth\Entity\Oauth2TokenInterface $token */
$token = reset($tokens);
return $token
->isRevoked();
}