A spec-compliant OAuth 2.0 authorization and resource server library for PHP
open sourceMITfree
league/oauth2-server is a standards-compliant OAuth 2.0 authorization server written in PHP, from The League of Extraordinary Packages and created by Alex Bilbie. It issues, refreshes and validates access tokens to protect an API. Out of the box it supports the authorization code (with PKCE), implicit, client credentials, password, refresh token and device authorization grants. You supply storage through its repository and entity interfaces, so it works with any database or framework.
Problems it solves
- add an OAuth 2.0 authorization server to my PHP API
- issue and refresh access tokens for third-party apps that call my API
- support the device authorization grant and PKCE in a PHP backend
- protect API routes with bearer tokens in a PSR-7 PHP app
Features
- Authorization code grant with PKCE (RFC 7636)
- Client credentials, password, implicit and refresh token grants
- Device authorization grant (RFC 8628)
- JWT access tokens (RFC 7519) and bearer token usage (RFC 6750)
- Resource server middleware for PSR-7 requests
- Storage through repository and entity interfaces
- Domain events
Alternatives
The same job
These do what OAuth 2.0 Server does.
- Ory Hydra Open source, OpenID Certified OAuth 2.0 server and OpenID Connect provider
