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);