RefreshTokenRepository.php in Simple OAuth (OAuth2) & OpenID Connect 8.4
File
src/Repositories/RefreshTokenRepository.php
View source
<?php
namespace Drupal\simple_oauth\Repositories;
use League\OAuth2\Server\Entities\RefreshTokenEntityInterface;
use League\OAuth2\Server\Repositories\RefreshTokenRepositoryInterface;
class RefreshTokenRepository implements RefreshTokenRepositoryInterface {
use RevocableTokenRepositoryTrait;
protected static $bundleId = 'refresh_token';
protected static $entityClass = 'Drupal\\simple_oauth\\Entities\\RefreshTokenEntity';
protected static $entityInterface = 'League\\OAuth2\\Server\\Entities\\RefreshTokenEntityInterface';
public function getNewRefreshToken() {
return $this
->getNew();
}
public function persistNewRefreshToken(RefreshTokenEntityInterface $refresh_token_entity) {
$this
->persistNew($refresh_token_entity);
}
public function revokeRefreshToken($token_id) {
$this
->revoke($token_id);
}
public function isRefreshTokenRevoked($token_id) {
return $this
->isRevoked($token_id);
}
}