aerialship/lightsaml
SAML 2.0 toolkit for Laravel/PHP to add SSO and identity federation to your apps. Provides helpers for SAML authentication flows, metadata, and certificate handling, making it easier to integrate with common IdPs and SPs.
Laravel SAML packages like onelogin/php-saml are alternatives but may be heavier).ext-soap, ext-xml). Modern Laravel (8+) may require polyfills or containerized PHP versions.Auth::guard('saml')->attempt())./saml/acs, /saml/ls endpoints).create_function, mb_* edge cases).domdocument → SimpleXML), add PHP 8.x support, and integrate with Laravel’s Http\Client.vendor/bin/saml) with:
saml.authenticated, saml.failed).onelogin/php-saml (actively maintained, but heavier).shibboleth/sp (enterprise-grade, but complex).RelayState, AuthnRequest IDs)?Auth::loginUsingId() for post-SAML auth)?onelogin/php-saml)?registerSamlService() in AppServiceProvider).HandleSamlRequests middleware to intercept SAML ACS/ARP endpoints.Saml facade for fluent API (e.g., Saml::validateResponse($request)).ext-xml, ext-soap, and ext-curl are enabled.spatie/array-to-xml for XML generation.guzzlehttp/guzzle for HTTP bindings (e.g., SOAP).saml_metadata table for partner SP/IdP configs (e.g., entity_id, acs_url, x509cert).saml_state table for AuthnRequest IDs, RelayState, and session data./saml/acs).Saml::login($user)).saml_metadata).config('saml.enabled')) to toggle between old/new implementations.composer require aerialship/lightsaml:dev-master).config/saml.php with:
entity_id, acs_url, certificate.Route::post('/saml/acs', [SamlController::class, 'handleAssertion']);
Route::get('/saml/ls', [SamlController::class, 'handleLogout']);
AuthManager to handle SAML users:
Auth::guard('web')->userResolver(function ($request) {
return Saml::getUserFromResponse($request);
});
How can I help you explore Laravel packages today?