You are here

public function Oauth2Token::isRevoked in Simple OAuth (OAuth2) & OpenID Connect 8.3

Same name and namespace in other branches
  1. 8.4 src/Entity/Oauth2Token.php \Drupal\simple_oauth\Entity\Oauth2Token::isRevoked()
  2. 8.2 src/Entity/Oauth2Token.php \Drupal\simple_oauth\Entity\Oauth2Token::isRevoked()
  3. 5.x src/Entity/Oauth2Token.php \Drupal\simple_oauth\Entity\Oauth2Token::isRevoked()

Check if the token was revoked.

Return value

bool TRUE if the token is revoked. FALSE otherwise.

Overrides Oauth2TokenInterface::isRevoked

File

src/Entity/Oauth2Token.php, line 219

Class

Oauth2Token
Defines the Oauth2 Token entity.

Namespace

Drupal\simple_oauth\Entity

Code

public function isRevoked() {
  return !$this
    ->get('status')->value;
}