Download the PHP package admin9/laravel-oidc-server without Composer
On this page you can find all versions of the php package admin9/laravel-oidc-server. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download admin9/laravel-oidc-server
More information about admin9/laravel-oidc-server
Files in admin9/laravel-oidc-server
Package laravel-oidc-server
Short Description OpenID Connect Server for Laravel Passport — adds OIDC Discovery, JWKS, UserInfo, Token Introspection, Token Revocation, and RP-Initiated Logout.
License MIT
Homepage https://github.com/admin9-labs/laravel-oidc-server
Informations about the package laravel-oidc-server
Laravel OIDC Server
中文文档
OpenID Connect Server for Laravel Passport — adds OIDC Discovery, JWKS, UserInfo, Token Introspection, Token Revocation, and RP-Initiated Logout to any Laravel + Passport application.
Requirements
- PHP 8.2+
- Laravel 11, 12, or 13
- Laravel Passport 12 or 13
Quick Start
Prerequisite: Laravel Passport must be installed and configured before using this package.
1. Install the package
2. Implement the interface on your User model
3. Generate Passport keys
This creates the RSA key pair (storage/oauth-private.key and storage/oauth-public.key) needed for signing tokens.
4. Create an OAuth client
Create a client application that will use your OIDC server:
You'll receive a Client ID and Client Secret — save these for configuring your client application.
Grant Type Guide:
- Authorization Code Flow: For web apps with user interaction, most secure
- Client Credentials Grant: For server-to-server API calls, no user involvement
- Password Grant: Only for first-party trusted apps, not recommended for third-party
5. (Optional) Publish and customize the config
Edit config/oidc-server.php to customize scopes, claims, token TTLs, and more.
That's it! Your OIDC server is ready. Test it by visiting:
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/.well-known/openid-configuration |
GET | OIDC Discovery |
/.well-known/jwks.json |
GET | JSON Web Key Set |
/oauth/authorize |
GET | Authorization (Passport) |
/oauth/token |
POST | Token (Passport) |
/oauth/userinfo |
GET/POST | UserInfo |
/oauth/introspect |
POST | Token Introspection (RFC 7662) |
/oauth/revoke |
POST | Token Revocation (RFC 7009) |
/oauth/logout |
GET | RP-Initiated Logout |
Configuration
After publishing the config file, you can customize various aspects in config/oidc-server.php:
User Model
By default, the package uses config('auth.providers.users.model') to look up users when generating ID tokens. Override if needed:
Passport Route Control
The package calls Passport::ignoreRoutes() by default to prevent route conflicts. Disable this if you need Passport's default routes alongside OIDC:
Default Claims Map
The HasOidcClaims trait resolves standard claims via a configurable map. Override to match your User model's schema:
For custom claims (e.g., nickname, picture), use claims_resolver or override resolveOidcClaim() in your User model.
Other Options
- Scopes & claims mapping —
scopes,claims_resolver - Token TTLs —
tokens.access_token_ttl,tokens.refresh_token_ttl,tokens.id_token_ttl - Route middleware —
routes.discovery_middleware,routes.token_middleware,routes.userinfo_middleware - Passport auto-configuration —
configure_passport(set tofalseto configure Passport yourself)
See the Configuration Reference for all available options.
Documentation
- Architecture
- Configuration Reference
- Endpoint Reference
- Claims Resolution
- Extension Points
- Troubleshooting
License
MIT
All versions of laravel-oidc-server with dependencies
defuse/php-encryption Version ^2.4
laravel/passport Version ^12.0|^13.0
lcobucci/jwt Version ^5.0
spatie/laravel-package-tools Version ^1.16