<?php
namespace App\Entity\OAuth2\Admin;
use Doctrine\ORM\Mapping as ORM;
use League\OAuth2\Server\Entities\AccessTokenEntityInterface;
use League\OAuth2\Server\Entities\RefreshTokenEntityInterface;
/**
* @ORM\Entity(
* repositoryClass = "App\Doctrine\Repository\OAuth2\Admin\AdminRefreshTokenRepository",
* )
*/
class AdminRefreshToken extends AbstractAdminToken implements RefreshTokenEntityInterface
{
public const DISCR = 'admin.refresh';
/**
* {@inheritDoc}
*/
public function setAccessToken(AccessTokenEntityInterface $accessToken): void
{
parent::setAccessToken($accessToken);
$this->setClient($accessToken->getClient());
$this->setUserIdentifier($accessToken->getUserIdentifier());
}
}