oauth-server
An OAuth 2.0 and OpenID Connect authorization server for PSR-7 / PSR-15 applications.
- PSR-7 messages in and out, PSR-15 request handlers and middleware: it fits any framework.
- No third-party runtime dependencies: only the PSR interface packages and PHP’s own
opensslandjson. - Storage, people, clients and keys are interfaces you implement; nothing here knows about your database.
- Small on purpose, and strict by default.
Install
One Composer package, PHP 8.2 or newer.
What it supports
Grants, OpenID Connect, logout, tokens, and what is not there yet.
Using it
Build the server, and what your application has to provide.
Roles, and APIs behind the server
Audiences, and claims that depend on the client.
Verifying tokens this server did not sign
The same checks, for a relying party or an API.
Security behaviour
Behaviour worth knowing before you go live.
Threat model
What the library defends against, how, and what it leaves to you.
Develop
Run the checks and follow the test conventions.