PHP + Laravel design (historical)
This is the original design document that motivated splitting the PHP
side into auth-server-php (vanilla core) + auth-server-laravel
(framework adapter). It lives in the auth platform repo as
AUTH-PHP-LARAVEL-DESIGN.md.
Useful when adding a future PHP-framework adapter (Symfony, CodeIgniter, etc.) — the split is intentionally similar to the TS side so the pattern is reusable.
Full text:
AUTH-PHP-LARAVEL-DESIGN.md
in the auth-server repo.
Short version:
auth-server-phpis the framework-agnostic core. Mirrorsauth-server-tsdirectory-for-directory so the patterns translate. PSR-driven ports (PSR-18, PSR-16, PSR-3) mean any modern PHP framework can plug in its own implementations.auth-server-laravelis the Laravel adapter. The custom guard + user provider + middleware aliases + Blade directives are all thin glue.- A Symfony adapter would look almost identical (security bundle, voter, twig extension, custom user provider, services.yaml binding).
Two integration patterns
- Pattern A — stateless. No local users table.
auth()->user()returns the principal directly. - Pattern B — composable. Local
userstable referenced byvendidit_id. The guard hydrates the model on each request.
config/vauth.php picks the pattern.