naf / oauth-server
Run your application as an OAuth2 authorization server and protect its APIs.
Requires
- php: >=8.3
- ext-json: *
- ext-openssl: *
- ext-pdo: *
- firebase/php-jwt: ^7.1
- naf/auth: ^0.2
- naf/form: ^0.2
- naf/framework: ^0.2
- naf/session: ^0.2
- psr/http-message: ^2.0
Requires (Dev)
- naf/cli: ^0.2
- naf/database: ^0.2
- naf/view: ^0.2
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^12.1
Suggests
- naf/cli: Generate keys and register client applications.
- naf/database: Install the OAuth schema as a migration.
- naf/view: Override the consent screen by shadowing its view.
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-13 20:55:29 UTC
README
naf/oauth-server
Be the place people sign in with — an OAuth2 authorization server and OpenID Connect provider, on the accounts you already have.
token()->requireScope('posts.write');
That is the whole of what an API endpoint has to say. The authorization, the consent, the tokens and their revocation are already wired.
🧩 Part of the official NAF plugin collection. Install it when other applications should be able to act on behalf of your users.
Documentation
Everything about this package — what it does, how it is configured and what it needs — lives in the NAF documentation. Not sure which packages you need? Start here.
Install
composer require naf/oauth-server
License
MIT. Part of NAF.
