menumbing / oauth2-server
OAuth2 component for Hyperf inspired from Laravel Passport
dev-master / 1.x-dev
2025-05-13 05:03 UTC
Requires
- php: >=8.1
- hyperf/cache: ^3.1
- hyperf/command: ^3.1
- hyperf/di: ^3.1
- hyperf/event: ^3.1
- league/oauth2-server: ^9.2
- menumbing/auth: ^1.0
- menumbing/hashing: ^1.0
- menumbing/orm: ^1.0
- phpseclib/phpseclib: ^3.0
- ramsey/uuid: ^4.7
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- mockery/mockery: ^1.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^10.0
- swoole/ide-helper: ^4.5
Suggests
- swow/swow: Required to create swow components.
This package is auto-updated.
Last update: 2025-05-13 08:00:30 UTC
README
menumbing/oauth2-server
is a standards compliant implementation of an OAuth 2.0
authorization server. This component is Hyperf component as wrapper of league/oauth2-server
.
You can easily configure an OAuth 2.0 server to protect your API with access tokens, or allow clients to request new access tokens and refresh them.
Out of the box it supports the following grants:
- Authorization code grant
- Client credentials grant
- Device authorization grant
- Implicit grant
- Refresh grant
- Resource owner password credentials grant
The following RFCs are implemented:
- RFC6749 "OAuth 2.0"
- RFC6750 "The OAuth 2.0 Authorization Framework: Bearer Token Usage"
- RFC7519 "JSON Web Token (JWT)"
- RFC7636 "Proof Key for Code Exchange by OAuth Public Clients"
- RFC8628 "OAuth 2.0 Device Authorization Grant
Requirements
- PHP>=8.1
- swoole extension
- openssl extension
- json extension
Installation
composer req menumbing/oauth2-server
php bin/hyperf.php install:oauth2
php bin/hyperf.php start
Generate Client
php bin/hyperf.php gen:oauth2-client