Привёл в порядок redirect_uris

This commit is contained in:
Artem Vasilev 2024-03-07 23:38:11 +03:00
parent bab9db5155
commit cd069bc6ef
2 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,7 @@ $wa->useScript('keepalive')
<div>
<?php echo $this->form->renderField('name'); ?>
<?php echo $this->form->renderField('public'); ?>
<?php echo $this->form->renderField('redirect_uri'); ?>
<?php echo $this->form->renderField('redirect_uris'); ?>
<?php echo $this->form->renderField('allow_plain_text_pkce'); ?>
<?php echo $this->form->renderField('identifier'); ?>
<?php echo $this->form->renderField('secret'); ?>

View File

@ -3,6 +3,7 @@
namespace Webmasterskaya\Component\OauthServer\Site\Repository;
use Joomla\CMS\Object\CMSObject;
use Joomla\Utilities\ArrayHelper;
use League\OAuth2\Server\Entities\ClientEntityInterface;
use League\OAuth2\Server\Repositories\ClientRepositoryInterface;
use Webmasterskaya\Component\OauthServer\Administrator\Model\ClientModel;
@ -62,7 +63,7 @@ class ClientRepository implements ClientRepositoryInterface
$clientEntity = new Client();
$clientEntity->setName($client->name);
$clientEntity->setIdentifier($client->identifier);
$clientEntity->setRedirectUri(array_map('strval', (array)$client->redirect_uris));
$clientEntity->setRedirectUri(ArrayHelper::getColumn((array)$client->redirect_uris, 'uri'));
$clientEntity->setConfidential(!$client->public);
$clientEntity->setAllowPlainTextPkce((bool)$client->allow_plain_text_pkce);