diff --git a/.gitignore b/.gitignore index 02e9625..df6e5c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ .idea -lib_oauthserver/vendor \ No newline at end of file +com_oauthserver/administrator/vendor \ No newline at end of file diff --git a/com_oauthserver/administrator/src/Helper/ComponentHelper.php b/com_oauthserver/administrator/src/Helper/ComponentHelper.php index 40ff66f..bdf6b3d 100644 --- a/com_oauthserver/administrator/src/Helper/ComponentHelper.php +++ b/com_oauthserver/administrator/src/Helper/ComponentHelper.php @@ -10,7 +10,7 @@ abstract class ComponentHelper if (!isset($registered)) { /** @var \Composer\Autoload\ClassLoader $loader */ - $loader = require JPATH_LIBRARIES . '/lib_oauthserver/vendor/autoload.php'; + $loader = require JPATH_ADMINISTRATOR . '/components/com_oauthserver/vendor/autoload.php'; $loader->unregister(); diff --git a/lib_oauthserver/composer.json b/composer.json similarity index 66% rename from lib_oauthserver/composer.json rename to composer.json index 5ca0a3d..f4dfd28 100644 --- a/lib_oauthserver/composer.json +++ b/composer.json @@ -2,11 +2,7 @@ "name": "webmaserskaya/lib_oauthserver", "type": "library", "license": "MIT", - "autoload": { - "psr-4": { - "Webmaserskaya\\Joomla\\OauthServer\\": "src/" - } - }, + "homepage": "https://github.com/webmasterskaya/joomla-oauth-server", "authors": [ { "name": "Artem Vasilev", @@ -16,8 +12,12 @@ "minimum-stability": "stable", "require": { "php": "^8.0", - "league/oauth2-server": "^8.5", "ext-openssl": "*", + "league/oauth2-server": "^8.5", "lcobucci/jwt": "^4.3" + }, + "config": { + "optimize-autoloader": true, + "vendor-dir": "com_oauthserver/administrator/vendor" } } diff --git a/lib_oauthserver/composer.lock b/composer.lock similarity index 99% rename from lib_oauthserver/composer.lock rename to composer.lock index c9527e3..af8bbf9 100644 --- a/lib_oauthserver/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f7d739043e749d41c66823516915439a", + "content-hash": "203520a60574e760c2e93defd127d014", "packages": [ { "name": "defuse/php-encryption",