symfony/security-http
Symfony Security HTTP integrates the Security Core with HTTP: firewalls, request handling, and authenticators to secure parts of your app and authenticate users. Install via composer require symfony/security-http.
#[IsGranted('ROLE_ADMIN')]).#[IsCsrfTokenValid] or custom token handlers.security:impersonate).#[CurrentUser] for tenant-specific data).Adopt if:
#[CurrentUser]).Look elsewhere if:
symfony/security-core or libsodium directly).lexik/jwt-authentication-bundle).For Executives:
"Symfony’s security-http component lets us standardize authentication/authorization across our PHP stack—reducing vulnerabilities, cutting dev time, and enabling features like MFA/OIDC without custom code. It’s used by enterprises like backers and aligns with our roadmap for SaaS security and compliance. The MIT license and Symfony’s sponsorship ensure long-term support."
For Engineering: *"This replaces ad-hoc auth logic with a modular, firewall-driven system. Key wins:
/admin → ROLE_ADMIN).#[IsGranted]) and union types for cleaner code.For Developers:
*"Ditch the spaghetti auth code. With security-http, you:
#[IsGranted] or #[CurrentUser].#[IsGranted('ROLE_API_USER')]
public function sensitiveData(): Response { ... }
Docs: Symfony Security Component."*
How can I help you explore Laravel packages today?