From e08f89aaefa5eff325145ebad7bf1bb8ed4d1193 Mon Sep 17 00:00:00 2001 From: Artem Vasilev Date: Sat, 2 Mar 2024 04:44:33 +0300 Subject: [PATCH] Structure init --- .gitignore | 2 + .../administrator/services/provider.php | 13 + .../administrator/src/Extension/Component.php | 36 + lib_oauthserver/composer.json | 21 + lib_oauthserver/composer.lock | 745 ++++++++++++++++++ .../en-GB/en-GB.plg_system_oauthserver.ini | 0 .../en-GB.plg_system_oauthserver.sys.ini | 0 .../ru-RU/ru-RU.plg_system_oauthserver.ini | 0 .../ru-RU.plg_system_oauthserver.sys.ini | 0 plg_system_oauthserver/oauthserver.xml | 23 + plg_system_oauthserver/services/provider.php | 13 + .../src/Extension/Plugin.php | 61 ++ .../en-GB/en-GB.plg_user_oauthserver.ini | 0 .../en-GB/en-GB.plg_user_oauthserver.sys.ini | 0 .../ru-RU/ru-RU.plg_user_oauthserver.ini | 0 .../ru-RU/ru-RU.plg_user_oauthserver.sys.ini | 0 plg_user_oauthserver/oauthserver.xml | 23 + plg_user_oauthserver/services/provider.php | 13 + plg_user_oauthserver/src/Extension/Plugin.php | 14 + 19 files changed, 964 insertions(+) create mode 100644 .gitignore create mode 100644 com_oauthserver/administrator/services/provider.php create mode 100644 com_oauthserver/administrator/src/Extension/Component.php create mode 100644 lib_oauthserver/composer.json create mode 100644 lib_oauthserver/composer.lock create mode 100644 plg_system_oauthserver/language/en-GB/en-GB.plg_system_oauthserver.ini create mode 100644 plg_system_oauthserver/language/en-GB/en-GB.plg_system_oauthserver.sys.ini create mode 100644 plg_system_oauthserver/language/ru-RU/ru-RU.plg_system_oauthserver.ini create mode 100644 plg_system_oauthserver/language/ru-RU/ru-RU.plg_system_oauthserver.sys.ini create mode 100644 plg_system_oauthserver/oauthserver.xml create mode 100644 plg_system_oauthserver/services/provider.php create mode 100644 plg_system_oauthserver/src/Extension/Plugin.php create mode 100644 plg_user_oauthserver/language/en-GB/en-GB.plg_user_oauthserver.ini create mode 100644 plg_user_oauthserver/language/en-GB/en-GB.plg_user_oauthserver.sys.ini create mode 100644 plg_user_oauthserver/language/ru-RU/ru-RU.plg_user_oauthserver.ini create mode 100644 plg_user_oauthserver/language/ru-RU/ru-RU.plg_user_oauthserver.sys.ini create mode 100644 plg_user_oauthserver/oauthserver.xml create mode 100644 plg_user_oauthserver/services/provider.php create mode 100644 plg_user_oauthserver/src/Extension/Plugin.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..02e9625 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +lib_oauthserver/vendor \ No newline at end of file diff --git a/com_oauthserver/administrator/services/provider.php b/com_oauthserver/administrator/services/provider.php new file mode 100644 index 0000000..d9b5dd4 --- /dev/null +++ b/com_oauthserver/administrator/services/provider.php @@ -0,0 +1,13 @@ += 2", + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "^5|^6|^7|^8|^9|^10", + "yoast/phpunit-polyfills": "^2.0.0" + }, + "bin": [ + "bin/generate-defuse-key" + ], + "type": "library", + "autoload": { + "psr-4": { + "Defuse\\Crypto\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Hornby", + "email": "taylor@defuse.ca", + "homepage": "https://defuse.ca/" + }, + { + "name": "Scott Arciszewski", + "email": "info@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "Secure PHP Encryption Library", + "keywords": [ + "aes", + "authenticated encryption", + "cipher", + "crypto", + "cryptography", + "encrypt", + "encryption", + "openssl", + "security", + "symmetric key cryptography" + ], + "support": { + "issues": "https://github.com/defuse/php-encryption/issues", + "source": "https://github.com/defuse/php-encryption/tree/v2.4.0" + }, + "time": "2023-06-19T06:10:36+00:00" + }, + { + "name": "lcobucci/clock", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/lcobucci/clock.git", + "reference": "6f28b826ea01306b07980cb8320ab30b966cd715" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/6f28b826ea01306b07980cb8320ab30b966cd715", + "reference": "6f28b826ea01306b07980cb8320ab30b966cd715", + "shasum": "" + }, + "require": { + "php": "~8.2.0 || ~8.3.0", + "psr/clock": "^1.0" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "require-dev": { + "infection/infection": "^0.27", + "lcobucci/coding-standard": "^11.0.0", + "phpstan/extension-installer": "^1.3.1", + "phpstan/phpstan": "^1.10.25", + "phpstan/phpstan-deprecation-rules": "^1.1.3", + "phpstan/phpstan-phpunit": "^1.3.13", + "phpstan/phpstan-strict-rules": "^1.5.1", + "phpunit/phpunit": "^10.2.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Lcobucci\\Clock\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Luís Cobucci", + "email": "lcobucci@gmail.com" + } + ], + "description": "Yet another clock abstraction", + "support": { + "issues": "https://github.com/lcobucci/clock/issues", + "source": "https://github.com/lcobucci/clock/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/lcobucci", + "type": "github" + }, + { + "url": "https://www.patreon.com/lcobucci", + "type": "patreon" + } + ], + "time": "2023-11-17T17:00:27+00:00" + }, + { + "name": "lcobucci/jwt", + "version": "5.2.0", + "source": { + "type": "git", + "url": "https://github.com/lcobucci/jwt.git", + "reference": "0ba88aed12c04bd2ed9924f500673f32b67a6211" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/0ba88aed12c04bd2ed9924f500673f32b67a6211", + "reference": "0ba88aed12c04bd2ed9924f500673f32b67a6211", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-sodium": "*", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "psr/clock": "^1.0" + }, + "require-dev": { + "infection/infection": "^0.27.0", + "lcobucci/clock": "^3.0", + "lcobucci/coding-standard": "^11.0", + "phpbench/phpbench": "^1.2.9", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.10.7", + "phpstan/phpstan-deprecation-rules": "^1.1.3", + "phpstan/phpstan-phpunit": "^1.3.10", + "phpstan/phpstan-strict-rules": "^1.5.0", + "phpunit/phpunit": "^10.2.6" + }, + "suggest": { + "lcobucci/clock": ">= 3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Lcobucci\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Luís Cobucci", + "email": "lcobucci@gmail.com", + "role": "Developer" + } + ], + "description": "A simple library to work with JSON Web Token and JSON Web Signature", + "keywords": [ + "JWS", + "jwt" + ], + "support": { + "issues": "https://github.com/lcobucci/jwt/issues", + "source": "https://github.com/lcobucci/jwt/tree/5.2.0" + }, + "funding": [ + { + "url": "https://github.com/lcobucci", + "type": "github" + }, + { + "url": "https://www.patreon.com/lcobucci", + "type": "patreon" + } + ], + "time": "2023-11-20T21:17:42+00:00" + }, + { + "name": "league/event", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/event.git", + "reference": "d2cc124cf9a3fab2bb4ff963307f60361ce4d119" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/event/zipball/d2cc124cf9a3fab2bb4ff963307f60361ce4d119", + "reference": "d2cc124cf9a3fab2bb4ff963307f60361ce4d119", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "~1.0.1", + "phpspec/phpspec": "^2.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Event\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Event package", + "keywords": [ + "emitter", + "event", + "listener" + ], + "support": { + "issues": "https://github.com/thephpleague/event/issues", + "source": "https://github.com/thephpleague/event/tree/master" + }, + "time": "2018-11-26T11:52:41+00:00" + }, + { + "name": "league/oauth2-server", + "version": "8.5.4", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/oauth2-server.git", + "reference": "ab7714d073844497fd222d5d0a217629089936bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/ab7714d073844497fd222d5d0a217629089936bc", + "reference": "ab7714d073844497fd222d5d0a217629089936bc", + "shasum": "" + }, + "require": { + "defuse/php-encryption": "^2.3", + "ext-openssl": "*", + "lcobucci/clock": "^2.2 || ^3.0", + "lcobucci/jwt": "^4.3 || ^5.0", + "league/event": "^2.2", + "league/uri": "^6.7 || ^7.0", + "php": "^8.0", + "psr/http-message": "^1.0.1 || ^2.0" + }, + "replace": { + "league/oauth2server": "*", + "lncd/oauth2": "*" + }, + "require-dev": { + "laminas/laminas-diactoros": "^3.0.0", + "phpstan/phpstan": "^0.12.57", + "phpstan/phpstan-phpunit": "^0.12.16", + "phpunit/phpunit": "^9.6.6", + "roave/security-advisories": "dev-master" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\OAuth2\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alex Bilbie", + "email": "hello@alexbilbie.com", + "homepage": "http://www.alexbilbie.com", + "role": "Developer" + }, + { + "name": "Andy Millington", + "email": "andrew@noexceptions.io", + "homepage": "https://www.noexceptions.io", + "role": "Developer" + } + ], + "description": "A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.", + "homepage": "https://oauth2.thephpleague.com/", + "keywords": [ + "Authentication", + "api", + "auth", + "authorisation", + "authorization", + "oauth", + "oauth 2", + "oauth 2.0", + "oauth2", + "protect", + "resource", + "secure", + "server" + ], + "support": { + "issues": "https://github.com/thephpleague/oauth2-server/issues", + "source": "https://github.com/thephpleague/oauth2-server/tree/8.5.4" + }, + "funding": [ + { + "url": "https://github.com/sephster", + "type": "github" + } + ], + "time": "2023-08-25T22:35:12+00:00" + }, + { + "name": "league/uri", + "version": "7.4.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "bf414ba956d902f5d98bf9385fcf63954f09dce5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/bf414ba956d902f5d98bf9385fcf63954f09dce5", + "reference": "bf414ba956d902f5d98bf9385fcf63954f09dce5", + "shasum": "" + }, + "require": { + "league/uri-interfaces": "^7.3", + "php": "^8.1" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-fileinfo": "to create Data URI from file contennts", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", + "league/uri-components": "Needed to easily manipulate URI objects components", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri/tree/7.4.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2023-12-01T06:24:25+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "7.4.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "bd8c487ec236930f7bbc42b8d374fa882fbba0f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/bd8c487ec236930f7bbc42b8d374fa882fbba0f3", + "reference": "bd8c487ec236930f7bbc42b8d374fa882fbba0f3", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^8.1", + "psr/http-factory": "^1", + "psr/http-message": "^1.1 || ^2.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "Common interfaces and classes for URI representation and interaction", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.4.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2023-11-24T15:40:42+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.100", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", + "shasum": "" + }, + "require": { + "php": ">= 7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2020-10-15T08:29:30+00:00" + }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "e616d01114759c4c489f93b099585439f795fe35" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + }, + "time": "2023-04-10T20:10:41+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.6.0" +} diff --git a/plg_system_oauthserver/language/en-GB/en-GB.plg_system_oauthserver.ini b/plg_system_oauthserver/language/en-GB/en-GB.plg_system_oauthserver.ini new file mode 100644 index 0000000..e69de29 diff --git a/plg_system_oauthserver/language/en-GB/en-GB.plg_system_oauthserver.sys.ini b/plg_system_oauthserver/language/en-GB/en-GB.plg_system_oauthserver.sys.ini new file mode 100644 index 0000000..e69de29 diff --git a/plg_system_oauthserver/language/ru-RU/ru-RU.plg_system_oauthserver.ini b/plg_system_oauthserver/language/ru-RU/ru-RU.plg_system_oauthserver.ini new file mode 100644 index 0000000..e69de29 diff --git a/plg_system_oauthserver/language/ru-RU/ru-RU.plg_system_oauthserver.sys.ini b/plg_system_oauthserver/language/ru-RU/ru-RU.plg_system_oauthserver.sys.ini new file mode 100644 index 0000000..e69de29 diff --git a/plg_system_oauthserver/oauthserver.xml b/plg_system_oauthserver/oauthserver.xml new file mode 100644 index 0000000..1055261 --- /dev/null +++ b/plg_system_oauthserver/oauthserver.xml @@ -0,0 +1,23 @@ + + + PLG_SYSTEM_OAUTHSERVER + PLG_SYSTEM_OAUTHSERVER_DESCRIPTION + Artem Vasilev + kern.usr@gmial.com + https://webmasterskaya.xyz + March 2024 + Copyright (C) 2024 Webmasterskaya. All rights reserved. + MIT; see LICENSE.txt + RELEASE_VERSION + Webmasterskaya\Plugin\System\OauthServer + + en-GB/en-GB.plg_system_oauthserver.ini + en-GB/en-GB.plg_system_oauthserver.sys.ini + ru-RU/ru-RU.plg_system_oauthserver.ini + ru-RU/ru-RU.plg_system_oauthserver.sys.ini + + + services + src + + \ No newline at end of file diff --git a/plg_system_oauthserver/services/provider.php b/plg_system_oauthserver/services/provider.php new file mode 100644 index 0000000..d9b5dd4 --- /dev/null +++ b/plg_system_oauthserver/services/provider.php @@ -0,0 +1,13 @@ + 'onAfterInitialise']; + } + + public function onAfterInitialise(): void + { + if (!$this->app->isClient('site')) { + return; + } + + $uri = Uri::getInstance(); + $path = $uri->getPath(); + + // Адрес сервера аутентификации должен быть статичным, + // чтобы гарантировать 100% доступность сервера + if (str_starts_with($path, '/login/oauth/') === false) { + return; + } + + $parts = explode('/', $path); + + if(empty($parts[2])){ + // TODO: Проверить, как стандартный роутер обработает этот вопрос и как отреагируют приложения на 404 от Joomla + return; + } + + $option = 'com_oauthserver'; + $task = $parts[2]; + + // TODO: Ставим в input option, task и view и запускаем компонент com_oauthserver + } +} \ No newline at end of file diff --git a/plg_user_oauthserver/language/en-GB/en-GB.plg_user_oauthserver.ini b/plg_user_oauthserver/language/en-GB/en-GB.plg_user_oauthserver.ini new file mode 100644 index 0000000..e69de29 diff --git a/plg_user_oauthserver/language/en-GB/en-GB.plg_user_oauthserver.sys.ini b/plg_user_oauthserver/language/en-GB/en-GB.plg_user_oauthserver.sys.ini new file mode 100644 index 0000000..e69de29 diff --git a/plg_user_oauthserver/language/ru-RU/ru-RU.plg_user_oauthserver.ini b/plg_user_oauthserver/language/ru-RU/ru-RU.plg_user_oauthserver.ini new file mode 100644 index 0000000..e69de29 diff --git a/plg_user_oauthserver/language/ru-RU/ru-RU.plg_user_oauthserver.sys.ini b/plg_user_oauthserver/language/ru-RU/ru-RU.plg_user_oauthserver.sys.ini new file mode 100644 index 0000000..e69de29 diff --git a/plg_user_oauthserver/oauthserver.xml b/plg_user_oauthserver/oauthserver.xml new file mode 100644 index 0000000..561161b --- /dev/null +++ b/plg_user_oauthserver/oauthserver.xml @@ -0,0 +1,23 @@ + + + PLG_USER_OAUTHSERVER + PLG_USER_OAUTHSERVER_DESCRIPTION + Artem Vasilev + kern.usr@gmial.com + https://webmasterskaya.xyz + March 2024 + Copyright (C) 2024 Webmasterskaya. All rights reserved. + MIT; see LICENSE.txt + RELEASE_VERSION + Webmasterskaya\Plugin\USER\OauthServer + + en-GB/en-GB.plg_user_oauthserver.ini + en-GB/en-GB.plg_user_oauthserver.sys.ini + ru-RU/ru-RU.plg_user_oauthserver.ini + ru-RU/ru-RU.plg_user_oauthserver.sys.ini + + + services + src + + \ No newline at end of file diff --git a/plg_user_oauthserver/services/provider.php b/plg_user_oauthserver/services/provider.php new file mode 100644 index 0000000..d9b5dd4 --- /dev/null +++ b/plg_user_oauthserver/services/provider.php @@ -0,0 +1,13 @@ +