Download the PHP package jdlien/laravel-saml without Composer

On this page you can find all versions of the php package jdlien/laravel-saml. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-saml

Laravel SAML

CI Packagist Version Total Downloads License

A SAML 2.0 toolkit for Laravel, built around SAML-Toolkits/php-saml (on packagist as onelogin/php-saml).

Requirements

Installation

The service provider is auto-discovered. Publish the config:

This creates config/saml.php. The shape mirrors the OneLogin PHP toolkit settings; see that project's docs for advanced options.

Configuration

Single IdP

If your application authenticates against a single IdP, fill in the idp section of config/saml.php (or supply the corresponding SAML_IDP_* env vars). The package auto-registers the resolver on boot.

Multiple IdPs

For multi-IdP scenarios, leave idp unset in config/saml.php and register a resolver from a service provider:

Calling Saml::idp($name)->redirect() resolves through the closure and caches the resulting SamlAuth instance.

Cert and key values

x509cert and privateKey accept either inline PEM strings or filesystem paths. Paths can be:

If a value looks like a path (string, no newlines, ≤4096 chars) but no file is found at either location, Saml::normalizeConfig() throws InvalidConfigException naming the offending config key.

Usage

For multi-IdP scenarios, swap any Saml::method() call below for Saml::idp($name)->method() to target a specific IdP.

Controller Scaffold

Routes

Method URI Name
GET {routesPrefix}/login saml.login
POST {routesPrefix}/acs saml.acs
GET {routesPrefix}/logout saml.logout
GET {routesPrefix}/sls saml.sls
GET {routesPrefix}/metadata saml.metadata

Middleware Requirements

Redirect to the IdP Login

Initiates SSO.

Assertion Consumer Service (ACS)

Handles the IdP's authentication response. Returns a SamlUser (which wraps the OneLogin Auth object plus convenience accessors).

Redirect to IdP Logout

The IdP returns a Logout Response through the user's browser to your /sls endpoint.

Single Logout Service (SLS)

Handles both Logout Responses (SP-initiated logout) and Logout Requests (IdP-initiated logout).

Metadata Endpoint

Publishes the SP metadata XML so the IdP can register your service.

Security

RelayState Validation

SamlUser::getIntendedUrl() is the safe accessor for the SAML RelayState — it validates the value against open-redirect attacks. It returns:

It returns null for cross-origin URLs, protocol-relative URLs (//example.com/...), javascript: / data: / other non-HTTP schemes, and anything malformed. Always prefer getIntendedUrl() over the raw RelayState when redirecting users after login.

If you have a legitimate reason to inspect the unvalidated value (e.g. logging, custom validation), use getRawRelayState() — but treat its output as user-controlled input.

Underlying SAML Implementation

The actual SAML 2.0 protocol logic — signature validation, XML canonicalization, encrypted assertion handling, etc. — lives in onelogin/php-saml. This package's job is the Laravel binding; it intentionally doesn't reimplement protocol primitives.

Migrating from overtrue/laravel-saml

This package is a successor to overtrue/laravel-saml. Migration is intentionally cheap:

  1. Update composer.json:

    Then composer update jdlien/laravel-saml.

  2. Update the service provider reference if you registered it manually (auto-discovered installs need no change). In bootstrap/providers.php (Laravel 11+) or config/app.php:

  3. Existing imports keep working — a compat shim aliases every Overtrue\LaravelSaml\… class name to its new home. You can update use statements at your leisure. The compat shim will be removed in v3.0.

  4. Facade calls (Saml::redirect(), etc.) need no changes. The facade name is preserved.

See CHANGELOG.md for behavior changes that may affect existing consumers.

Testing

License

MIT. See LICENSE.

Originally based on overtrue/laravel-saml by @overtrue. Now maintained as an independent package by @jdlien — modernized for Laravel 12/13 and PHP 8.3+, with bug fixes, security hardening, and full Pest 4 test coverage.


All versions of laravel-saml with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-dom Version *
ext-libxml Version *
ext-openssl Version *
ext-zlib Version *
laravel/framework Version ^12.0|^13.0
onelogin/php-saml Version ^4.3.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jdlien/laravel-saml contains the following files

Loading the files please wait ...