Package

24Slides Laravel Saml2

SAML2 Service Provider integration to your Laravel 5.4+ application, based on OneLogin toolkit

Package

24slides/laravel-saml2

View on GitHub →

Laravel SAML2 Service Provider Package

The Laravel SAML2 package is designed to transform your Laravel application into a SAML-compliant Service Provider (SP), facilitating Single Sign-On (SSO) via the SAML2 protocol. Leveraging the OneLogin PHP-SAML toolkit, this package supports integration with multiple Identity Providers (IdPs), making it an ideal choice for enterprise-level applications requiring robust authentication mechanisms.

Key Features

  • Multi-IdP Support: Manage and authenticate against multiple identity providers.
  • Automatic Service Provider Registration: For Laravel 5.5+, service providers are auto-registered.
  • Customizable SAML Configuration: Extensive configuration options inherited from the OneLogin toolkit.
  • Tenant Management: Unique system for handling multiple IdPs using tenant entities.
  • Event Handling: Easy to use event listeners for SAML authentication events.
  • Pre-configured Routes: Built-in routes for SAML actions which can be customized or disabled.
  • SSO Friendly Links: Helper functions to generate SSO-compatible links, ideal for email integration.

Installation and Configuration

  1. Installation:

    composer require 24slides/laravel-saml2
    
  2. Publish Configuration:

    php artisan vendor:publish --provider="Slides\Saml2\ServiceProvider"
    
  3. Database Migration:

    php artisan migrate
    
  4. Configuration: Modify the saml2.php in your app/config directory following the detailed instructions within the file, pulling settings from the OneLogin toolkit documentation as needed.

  5. Middleware Setup: Define necessary middleware for SAML routes in app/Http/Kernel.php.

Usage

  • Authentication: Add listeners for Slides\Saml2\Events\SignedIn and Slides\Saml2\Events\SignedOut to handle user sessions.
  • Tenant Management: Use artisan commands like artisan saml2:create-tenant to manage SAML tenants.
  • Logging Out: Implement SAML-compliant logout mechanisms that communicate with the IdP.

Example Setup

An example setup with Azure AD is provided, detailing how to retrieve IdP credentials, create a tenant, and configure your IdP using the generated settings.

Testing and Security

  • Run Tests: Execute vendor/bin/phpunit within the package directory.
  • Security Issues: Report any security concerns via the provided email address, not through public issue trackers.

This package is essential for developers looking to implement SAML-based SSO in their Laravel applications, providing a comprehensive toolkit for managing authentication across multiple identity providers efficiently.

24Slides Laravel Saml2 Related Articles

BookStack is a simple and free Wiki software Written in Laravel image

BookStack is a simple and free Wiki software Written in Laravel

Read article
2019 in Review image

2019 in Review

Read article
80 Laravel Tutorials, Packages, and Resources from 2016 image

80 Laravel Tutorials, Packages, and Resources from 2016

Read article
90 Laravel Tutorials, Packages, and Resources from 2023 image

90 Laravel Tutorials, Packages, and Resources from 2023

Read article
Laravel News 2025 Recap image

Laravel News 2025 Recap

Read article
Laravel News 2024 Recap image

Laravel News 2024 Recap

Read article

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm

Let your users buy domains without leaving your app

If your Laravel app gives users a site, a storefront, or a workspace, they’ll eventually want their own domain. The name.com API lets them search, register, and connect one without leaving your product. It’s a clean REST API, so Laravel’s HTTP client is all you need.

Let your users buy domains without leaving your app

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum