rhertogh / yii2-oauth2-server
A Yii2 Oauth 2 and OpenID Connect server based on thephpleague/oauth2-server
Installs: 5 818
Dependents: 0
Suggesters: 0
Security: 0
Stars: 18
Watchers: 6
Forks: 8
Open Issues: 2
Type:yii2-extension
Requires
- php: >=7.4.0
- league/oauth2-server: ~8.4.2
- yiisoft/yii2: ~2.0.49
Requires (Dev)
- ext-json: *
- ext-xdebug: *
- codeception/codeception: ~4.1.22
- codeception/module-asserts: ~1.3.1
- codeception/module-rest: ~1.3.2
- codeception/module-yii2: ~1.1.3
- friendsofphp/php-cs-fixer: ^3.8
- league/oauth2-client: ~2.7.0
- proget-hq/phpstan-yii2: *
- schmunk42/yii2-giiant: dev-master#7d27dd40604af842905768d6be43bcc96c02cee2
- squizlabs/php_codesniffer: 3.*
- vlucas/phpdotenv: ~5.3
- web-token/jwt-checker: ~2.2.11
- web-token/jwt-key-mgmt: ~2.2.11
- web-token/jwt-signature: ~2.2.11
- web-token/jwt-signature-algorithm-ecdsa: ~2.2.11
- web-token/jwt-signature-algorithm-hmac: ~2.2.11
- web-token/jwt-signature-algorithm-rsa: ~2.2.11
- yiisoft/yii2: dev-master
- yiisoft/yii2-apidoc: ~3.0.6
- yiisoft/yii2-authclient: dev-master
- yiisoft/yii2-bootstrap4: ~2.0.10
- yiisoft/yii2-coding-standards: ~2.0
- yiisoft/yii2-debug: ~2.1.18
- dev-master / 1.0.0.x-dev
- 1.0.0-alpha18
- 1.0.0-alpha17
- 1.0.0-alpha16
- 1.0.0-alpha15
- 1.0.0-alpha14
- 1.0.0-alpha13
- 1.0.0-alpha12
- 1.0.0-alpha11
- 1.0.0-alpha10
- 1.0.0-alpha9
- 1.0.0-alpha8
- 1.0.0-alpha7
- 1.0.0-alpha6
- 1.0.0-alpha5
- 1.0.0-alpha4
- 1.0.0-alpha3
- 1.0.0-alpha2
- 1.0.0-alpha
- dev-guide_identity_permissions_and_scopes
This package is auto-updated.
Last update: 2024-12-07 16:04:15 UTC
README
Oauth2 + OpenID Connect Extension for Yii 2
The Yii2-Oauth2-Server is an extension for Yii framework 2.0 applications and provides an Oauth2 server based on the League OAuth2 server. The server also supports OpenID Connect Core.
๐ Contents
- Getting started
- Test Drive
- Documentation
- FAQ
- Implemented Standards
- Importing/Migrating
- Versioning & Change Log
- Reporting Security issues
- Directory Structure
- Contributing
- Credits
- License
๐ฃ Getting started
If you're not yet familiar with Oauth 2 we recommend to check out An Illustrated Guide to OAuth and OpenID Connect
Requirements:
- The minimum required PHP version is 7.4 (compatibility tested up till and including PHP 8.1).
- The minimum required Yii version is 2.0.49 (2.0.50 when using SQLite).
Installation:
The preferred way to install this extension is through composer.
composer require rhertogh/yii2-oauth2-server
Full installation and configuration details can be found in the docs under Installing the Yii2-Oauth2-Server
๐๏ธ Test Drive
You can run a local preview instance using Docker:
docker run --rm -p 82:80 --name Yii2Oauth2Server ghcr.io/rhertogh/yii2-oauth2-server:master
After the container is started you can access the Oauth2 server on localhost:82.
Hint: The port number on the host machine is specified by the first part of the
-p
argument. This can be changed if desired (e.g.-p 88:80
).
To access the CLI of the Docker container you can run:
docker container exec -it Yii2Oauth2Server bash
๐ Documentation
There are two main sections in the documentation:
- Usage Guide for using the Yii2-Oauth2-Server in your own project.
- Development Guide for contributing to the Yii2-Oauth2-Server.
๐ฎ FAQ
This is a quick FAQ, the full version can be found here.
Where can I find the Oauth2 endpoints?
To see an overview of the endpoints and other configuration you can run: ./yii oauth2/debug/config
How can I see the configured clients?
To see an overview of the clients you can run: ./yii oauth2/client/list
The Oauth2 server throws an error, what should I do?
Please check out the full FAQ first. If that doesn't solve the problem, please report an issue.
๐ Implemented Standards
ยน Provided via PHP OAuth 2.0 Server.
โ๏ธ Importing/Migrating
To ease migrating from another project, the Yii2-Oauth2-Server supports importing data from other projects. For example from the filsh/yii2-oauth2-server
Please see Importing/Migrating from other servers for more information.
๐ Versioning & Change Log
The Yii2-Oauth2-Server follows Semantic Versioning 2.0
Please see the Change Log for more information on version history
and the Upgrading Instructions when upgrading to a newer version.
๐ Reporting Security issues
In case you found a security issue please contact us directly DO NOT use the issue tracker or discuss it in public as it will cause more damage than help.
Please note that as a non-commercial OpenSource project we are not able to pay bounties.
๐ Directory Structure
docker/ Docker container definition
docs/ Documentation (for both usage and development)
sample/ Sample app for the server
src/ Yii2-Oauth2-Server source
tests/ Codeception unit and functional tests
๐ Contributing
The Yii2-Oauth2-Server is Open Source. You can help by:
Thanks in advance for your contribution!
๐ Credits
โ๏ธ License
The Yii2-Oauth2-Server is free software. It is released under the terms of the Apache License.
Please see LICENSE.md
for more information.