From cd069bc6efc5c076bb5c0ce2109e6b29f0b2cb5e Mon Sep 17 00:00:00 2001 From: Artem Vasilev Date: Thu, 7 Mar 2024 23:38:11 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B8=D0=B2=D1=91=D0=BB=20=D0=B2?= =?UTF-8?q?=20=D0=BF=D0=BE=D1=80=D1=8F=D0=B4=D0=BE=D0=BA=20redirect=5Furis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- com_oauthserver/administrator/tmpl/client/edit.php | 2 +- com_oauthserver/site/src/Repository/ClientRepository.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/com_oauthserver/administrator/tmpl/client/edit.php b/com_oauthserver/administrator/tmpl/client/edit.php index 5780e54..4ddb118 100644 --- a/com_oauthserver/administrator/tmpl/client/edit.php +++ b/com_oauthserver/administrator/tmpl/client/edit.php @@ -31,7 +31,7 @@ $wa->useScript('keepalive')
form->renderField('name'); ?> form->renderField('public'); ?> - form->renderField('redirect_uri'); ?> + form->renderField('redirect_uris'); ?> form->renderField('allow_plain_text_pkce'); ?> form->renderField('identifier'); ?> form->renderField('secret'); ?> diff --git a/com_oauthserver/site/src/Repository/ClientRepository.php b/com_oauthserver/site/src/Repository/ClientRepository.php index b453b6e..243f547 100644 --- a/com_oauthserver/site/src/Repository/ClientRepository.php +++ b/com_oauthserver/site/src/Repository/ClientRepository.php @@ -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);