diff --git a/com_oauthserver/administrator/src/Extension/Component.php b/com_oauthserver/administrator/src/Extension/Component.php index 3f83a50..314205a 100644 --- a/com_oauthserver/administrator/src/Extension/Component.php +++ b/com_oauthserver/administrator/src/Extension/Component.php @@ -16,6 +16,7 @@ use Joomla\CMS\Component\Router\RouterServiceTrait; use Joomla\CMS\Extension\BootableExtensionInterface; use Joomla\CMS\Extension\MVCComponent; use Joomla\CMS\HTML\HTMLRegistryAwareTrait; +use Joomla\CMS\Plugin\PluginHelper; use Psr\Container\ContainerInterface; use Webmasterskaya\Component\OauthServer\Administrator\Helper\ComponentHelper; @@ -41,5 +42,7 @@ class Component extends MVCComponent implements public function boot(ContainerInterface $container): void { ComponentHelper::registerComponentDependencies(); + + PluginHelper::importPlugin('oauthserver'); } } diff --git a/com_oauthserver/site/src/Repository/ScopeRepository.php b/com_oauthserver/site/src/Repository/ScopeRepository.php index f85bd7c..b1bc966 100644 --- a/com_oauthserver/site/src/Repository/ScopeRepository.php +++ b/com_oauthserver/site/src/Repository/ScopeRepository.php @@ -9,7 +9,6 @@ namespace Webmasterskaya\Component\OauthServer\Site\Repository; -use Joomla\CMS\Plugin\PluginHelper; use Joomla\Event\DispatcherAwareInterface; use Joomla\Event\DispatcherAwareTrait; use League\OAuth2\Server\Entities\ClientEntityInterface; @@ -69,13 +68,11 @@ class ScopeRepository implements ScopeRepositoryInterface, DispatcherAwareInterf $scopes = $this->setupScopes($client, array_values($scopes)); - PluginHelper::importPlugin('oauthserver'); - $event = new ScopeResolveEvent( 'onScopeResolve', [ 'scopes' => $scopes, - 'grant' => $grantType, + 'grant' => $grantType, 'client' => $client, 'userId' => $userIdentifier ]