Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Saml2 Bridge Bundle

Saml2 Bridge Bundle Laravel Package

adactive-sas/saml2-bridge-bundle

Symfony bundle adding basic SAML2 IdP capabilities via simplesamlphp/saml2: metadata, SSO and SLO with HTTP-POST/Redirect bindings, signed requests/responses, and IdP/SP-initiated logout. Configure routes, keys, and repositories via YAML.

View on GitHub
Deep Wiki
Context7

Symfony bundle that provide a SAML Identity Provider (idp).

Frequently asked questions about Saml2 Bridge Bundle
Can I use this SAML bundle directly in Laravel without Symfony?
No, this bundle is Symfony-based. You’ll need to integrate it via Laravel’s Symfony bridge (e.g., `laravel/symfony-bridge`) or wrap it in a Laravel Service Provider. Middleware will be required to handle SAML redirects/responses in Laravel’s request lifecycle.
What Laravel versions does this bundle support?
The bundle itself targets Symfony 3.x and PHP 7.1–7.3, but you can use it with Laravel 7/8 via the Symfony bridge. Laravel 9+ may need additional shimming for Symfony 6+ compatibility. Test thoroughly for PHP 8.x due to potential `simplesamlphp/saml2` deprecations.
Does this bundle support SAML 2.1 or advanced features like attribute mapping?
No, it only supports SAML 2.0 basics (SSO/SLO, metadata, HTTP-POST/Redirect bindings). For SAML 2.1, attribute mapping, or multi-IdP setups, consider alternatives like `onelogin/php-saml` or `shibboleth/sp`, which offer broader feature sets.
How do I configure SAML keys (public/private) for signing requests?
Define paths to your key files in the YAML config under `identity_provider.public_key` and `identity_provider.private_key`. Ensure the keys are in PEM format and accessible by the web server. Example: `private_key: %kernel.project_dir%/config/idp_private_key.pem`.
Will this bundle work with Laravel’s authentication system (e.g., Auth::login)?
Indirectly. You’ll need to sync Symfony’s UserProvider with Laravel’s Auth system via a custom Service Provider. Store SAML sessions in Laravel’s session table or a dedicated `saml_sessions` table, then map them to Laravel users during login/logout.
What’s the fallback if this bundle is abandoned or breaks in PHP 8.x?
Switch to `onelogin/php-saml` (pure PHP, actively maintained) or offload SAML to a Symfony microservice. Fork the bundle and patch `simplesamlphp/saml2` for PHP 8.x if critical, but weigh the maintenance cost against alternatives.
Can I disable the Identity Provider (IdP) and only use Service Provider (SP) mode?
Yes, set `identity_provider.enabled: false` in the YAML config. The bundle supports independent toggling of IdP/SP functionality. For SP-only mode, configure `service_provider` routes and metadata endpoints similarly to IdP.
How do I handle SAML Single Logout (SLO) with Laravel’s session management?
Configure SLO routes (`sls_route`, `logout_route`) in YAML and register a logout handler. Use middleware to invalidate Laravel sessions during SLO. Example: `handlers: [adactive_sas_saml2_bridge.logout.handler]`, then clear Laravel’s session storage manually in the handler.
Are there any known issues with this bundle in production?
Yes: stale maintenance (last release 2018) risks PHP 8.x/Symfony 6+ incompatibilities. Test edge cases like malformed SAML responses or timeouts. The GPL-3.0 license may conflict with proprietary projects—review legal implications before use.
How do I test SAML flows locally before deploying to production?
Use a dummy Service Provider like SimpleSAMLphp’s test SP to validate SSO/SLO. Mock routes in Laravel (e.g., `metadata_route`, `sso_route`) and verify signed requests/responses with tools like SAML Tracer. Test both IdP-initiated and SP-initiated flows.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky