public function RevocableTokenRepositoryTrait::isRevoked in Simple OAuth (OAuth2) & OpenID Connect 8.2
Same name and namespace in other branches
- 8.4 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 simple_oauth_extras/
src/ Repositories/ AuthCodeRepository.php - RefreshTokenRepository::isRefreshTokenRevoked in src/
Repositories/ RefreshTokenRepository.php
File
- src/
Repositories/ RevocableTokenRepositoryTrait.php, line 66
Class
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();
}