Вернул отдельную реализацию Client Entity

This commit is contained in:
Artem Vasilev 2024-03-06 12:51:01 +03:00
parent b6381f74f0
commit dc4b1734ab

View File

@ -0,0 +1,46 @@
<?php
namespace Webmasterskaya\Component\OauthServer\Site\Entity;
use League\OAuth2\Server\Entities\ClientEntityInterface;
use League\OAuth2\Server\Entities\Traits\ClientTrait;
use League\OAuth2\Server\Entities\Traits\EntityTrait;
class Client implements ClientEntityInterface
{
use ClientTrait;
use EntityTrait;
/**
* @var bool
*/
private $allowPlainTextPkce = true;
public function setName(string $name): void
{
$this->name = $name;
}
/**
* @param string[] $redirectUri
*/
public function setRedirectUri(array $redirectUri): void
{
$this->redirectUri = $redirectUri;
}
public function setConfidential(bool $isConfidential): void
{
$this->isConfidential = $isConfidential;
}
public function isPlainTextPkceAllowed(): bool
{
return $this->allowPlainTextPkce;
}
public function setAllowPlainTextPkce(bool $allowPlainTextPkce): void
{
$this->allowPlainTextPkce = $allowPlainTextPkce;
}
}