menumbing/oauth2-server

OAuth2 component for Hyperf inspired from Laravel Passport

dev-master / 1.x-dev 2025-05-13 05:03 UTC

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:

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