rhertogh/yii2-oauth2-server
Composer 安装命令:
composer require rhertogh/yii2-oauth2-server
包简介
A Yii2 Oauth 2 and OpenID Connect server based on thephpleague/oauth2-server
关键字:
README 文档
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
-pargument. 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
| Name | RFC / Specs | Since |
|---|---|---|
| OAuth 2.0 | RFC 6749 | 1.0.0¹ |
| The OAuth 2.0 Authorization Framework: Bearer Token Usage | RFC 6750 | 1.0.0¹ |
| Proof Key for Code Exchange by OAuth Public Clients (PKCE) | RFC 7636 | 1.0.0¹ |
| OAuth 2.0 Token Revocation | RFC 7009 | 1.0.0 |
| OpenID Connect Core 1.0 | Specifications | 1.0.0 |
| OpenID Connect Discovery 1.0 | Specifications | 1.0.0 |
| OpenID Connect RP-Initiated Logout | Specifications | 1.0.0 |
| Initiating User Registration via OpenID Connect | Specifications | 1.0.0 |
¹ 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.
rhertogh/yii2-oauth2-server 适用场景与选型建议
rhertogh/yii2-oauth2-server 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12.71k 次下载、GitHub Stars 达 19, 最近一次更新时间为 2021 年 11 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「OpenID Connect」 「yii2」 「oauth 2」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 rhertogh/yii2-oauth2-server 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 rhertogh/yii2-oauth2-server 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 rhertogh/yii2-oauth2-server 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A custom URL rule class for Yii 2 which allows to create translated URL rules
Ory-Hydra OAuth 2.0 Client Provider for The PHP League OAuth2-Client
Bare-bones OpenID Connect client
Customize JWT claims in Laravel Passport access tokens
Multi-provider authentication framework for PHP
DreamFactory Oasys(tm) Open Authentication System
统计信息
- 总下载量: 12.71k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 19
- 点击次数: 35
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2021-11-11