You are here

class RefreshTokenRepository in Simple OAuth (OAuth2) & OpenID Connect 8.4

Same name and namespace in other branches
  1. 8.2 src/Repositories/RefreshTokenRepository.php \Drupal\simple_oauth\Repositories\RefreshTokenRepository
  2. 8.3 src/Repositories/RefreshTokenRepository.php \Drupal\simple_oauth\Repositories\RefreshTokenRepository
  3. 5.x src/Repositories/RefreshTokenRepository.php \Drupal\simple_oauth\Repositories\RefreshTokenRepository

The refresh token repository.

Hierarchy

Expanded class hierarchy of RefreshTokenRepository

1 string reference to 'RefreshTokenRepository'
simple_oauth.services.yml in ./simple_oauth.services.yml
simple_oauth.services.yml
1 service uses RefreshTokenRepository
simple_oauth.repositories.refresh_token in ./simple_oauth.services.yml
Drupal\simple_oauth\Repositories\RefreshTokenRepository

File

src/Repositories/RefreshTokenRepository.php, line 11

Namespace

Drupal\simple_oauth\Repositories
View source
class RefreshTokenRepository implements RefreshTokenRepositoryInterface {
  use RevocableTokenRepositoryTrait;

  /**
   * The bundle ID.
   *
   * @var string
   */
  protected static $bundleId = 'refresh_token';

  /**
   * The OAuth2 entity class name.
   *
   * @var string
   */
  protected static $entityClass = 'Drupal\\simple_oauth\\Entities\\RefreshTokenEntity';

  /**
   * The OAuth2 entity interface name.
   *
   * @var string
   */
  protected static $entityInterface = 'League\\OAuth2\\Server\\Entities\\RefreshTokenEntityInterface';

  /**
   * {@inheritdoc}
   */
  public function getNewRefreshToken() {
    return $this
      ->getNew();
  }

  /**
   * {@inheritdoc}
   */
  public function persistNewRefreshToken(RefreshTokenEntityInterface $refresh_token_entity) {
    $this
      ->persistNew($refresh_token_entity);
  }

  /**
   * {@inheritdoc}
   */
  public function revokeRefreshToken($token_id) {
    $this
      ->revoke($token_id);
  }

  /**
   * {@inheritdoc}
   */
  public function isRefreshTokenRevoked($token_id) {
    return $this
      ->isRevoked($token_id);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
RefreshTokenRepository::$bundleId protected static property The bundle ID.
RefreshTokenRepository::$entityClass protected static property The OAuth2 entity class name.
RefreshTokenRepository::$entityInterface protected static property The OAuth2 entity interface name.
RefreshTokenRepository::getNewRefreshToken public function
RefreshTokenRepository::isRefreshTokenRevoked public function
RefreshTokenRepository::persistNewRefreshToken public function
RefreshTokenRepository::revokeRefreshToken public function
RevocableTokenRepositoryTrait::$entityTypeId protected static property The entity type ID.
RevocableTokenRepositoryTrait::$entityTypeManager protected property The entity type manager.
RevocableTokenRepositoryTrait::$serializer protected property The serializer.
RevocableTokenRepositoryTrait::getNew public function
RevocableTokenRepositoryTrait::isRevoked public function
RevocableTokenRepositoryTrait::persistNew public function
RevocableTokenRepositoryTrait::revoke public function
RevocableTokenRepositoryTrait::__construct public function Construct a revocable token.