AuthCodeRepository.php in Simple OAuth (OAuth2) & OpenID Connect 8.4
File
src/Repositories/AuthCodeRepository.php
View source
<?php
namespace Drupal\simple_oauth\Repositories;
use League\OAuth2\Server\Entities\AuthCodeEntityInterface;
use League\OAuth2\Server\Repositories\AuthCodeRepositoryInterface;
class AuthCodeRepository implements AuthCodeRepositoryInterface {
use RevocableTokenRepositoryTrait;
protected static $bundleId = 'auth_code';
protected static $entityClass = 'Drupal\\simple_oauth\\Entities\\AuthCodeEntity';
protected static $entityInterface = 'League\\OAuth2\\Server\\Entities\\AuthCodeEntityInterface';
public function getNewAuthCode() {
return $this
->getNew();
}
public function persistNewAuthCode(AuthCodeEntityInterface $auth_code_entity) {
$this
->persistNew($auth_code_entity);
}
public function revokeAuthCode($code_id) {
$this
->revoke($code_id);
}
public function isAuthCodeRevoked($code_id) {
return $this
->isRevoked($code_id);
}
}