Download the PHP package besnovatyj/yii2-cms-oauth2 without Composer

On this page you can find all versions of the php package besnovatyj/yii2-cms-oauth2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-cms-oauth2

besnovatyj/yii2-cms-oauth2

OAuth2-сервер для REST-слоя Yii2 CMS — тонкая интеграция библиотеки league/oauth2-server в Yii2. Отвечает за выдачу токенов (grant types: password, refresh_token) и валидацию Bearer-токенов на входящих REST-запросах.

Это инфраструктурный фундамент REST: от него зависят REST-контроллеры любых модулей (по аналогии с тем, как backend/frontend-контроллеры зависят от своих приложений).

Состав

Установка

Миграции накатываются менеджером модулей (modman) при установке. Затем:

  1. Сгенерировать ключи (в репозиторий не входят, см. docs/keys/README.md):

  2. Смонтировать компоненты в конфиге приложения (composition root, напр. app/rest/config/main.php):

  3. Endpoint выдачи токена (POST /oauth2/token) — контроллер в REST-приложении (см. пример app/rest/controllers/OAuth2Controller.php).

Полная документация, примеры запросов, SQL и TypeScript-клиент — в docs/.

⚠️ Остаточная зависимость от модуля User

src/repositories/UserRepository.php (реализация «password grant») пока ссылается напрямую на Besnovatyj\User\repositories\UserReadRepository — резолвится через DI-контейнер (Yii::$container->get(...)). Это единственная точка связи с ядром/модулем User.

План развязки (см. docs/MIGRATION-NOTE.md и общий отчёт GITHUB_MIGRATION_READINESS.md, раздел B6): инвертировать через контракт UserProvider в yii2-cms-contracts (метод вида findActiveByUsername() / validateCredentials()), либо перенести этот репозиторий в пакет besnovatyj/yii2-cms-user при его выделении. До этого пакет корректно работает в составе приложения, где Besnovatyj\User доступен, но автономно (без User) собирается, но не функционирует password-grant.

Тот же residual-момент в dev-скрипте docs/dev/create-test-user.php (Besnovatyj\User\entities\User).

Зависимости

php >=8.4, yiisoft/yii2, league/oauth2-server ^9, nyholm/psr7, nyholm/psr7-server, psr/http-message, besnovatyj/yii2-cms-kernel, besnovatyj/yii2-cms-contracts.

Лицензия

MIT.


All versions of yii2-cms-oauth2 with dependencies

PHP Build Version
Package Version
Requires besnovatyj/yii2-cms-kernel Version ^1.0
besnovatyj/yii2-cms-contracts Version ^1.0
php Version >=8.4
yiisoft/yii2 Version ~2.0.0
league/oauth2-server Version ^9.0
nyholm/psr7 Version ^1.8
nyholm/psr7-server Version ^1.1
psr/http-message Version ^1.1 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package besnovatyj/yii2-cms-oauth2 contains the following files

Loading the files please wait ...