mirror of
https://github.com/webmasterskaya/joomla-oauth-server.git
synced 2025-04-19 00:43:04 +03:00
56 lines
1.2 KiB
PHP
56 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* @package Joomla.Site
|
|
* @subpackage com_oauthserver
|
|
*
|
|
* @copyright (c) 2024. Webmasterskaya. <https://webmasterskaya.xyz>
|
|
* @license MIT; see LICENSE.txt
|
|
**/
|
|
|
|
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;
|
|
|
|
\defined('_JEXEC') or die;
|
|
|
|
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;
|
|
}
|
|
}
|