for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Acme\App\Infrastructure\Auth\Authentication\Oauth;
use League\OAuth2\Server\Entities\RefreshTokenEntityInterface;
use League\OAuth2\Server\Entities\Traits\EntityTrait;
use League\OAuth2\Server\Entities\Traits\RefreshTokenTrait;
/**
* Class OauthRefreshToken
*
* @method OauthAccessToken getAccessToken()
*/
class OauthRefreshToken implements RefreshTokenEntityInterface
{
use EntityTrait;
use RefreshTokenTrait;
* @var bool
private $revoked = false;
public function __construct()
$this->setIdentifier(new OauthRefreshTokenId());
}
public function isRevoked(): bool
return $this->revoked;
public function revoke(): void
$this->revoked = true;