PHPackages                             aerdes/laravel-samlite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. aerdes/laravel-samlite

Abandoned → [lukasmu/laravel-samlite](/?search=lukasmu%2Flaravel-samlite)ArchivedLibrary[Authentication &amp; Authorization](/categories/authentication)

aerdes/laravel-samlite
======================

Enable authentication against SAML identity providers for your Laravel application

v0.2.1(5y ago)22.4k1MITPHPPHP ^7.2.5

Since May 5Pushed 5y agoCompare

[ Source](https://github.com/aerdes/laravel-samlite)[ Packagist](https://packagist.org/packages/aerdes/laravel-samlite)[ Docs](https://github.com/aerdes/laravel-samlite)[ RSS](/packages/aerdes-laravel-samlite/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (4)Used By (0)

Enable authentication against SAML identity providers for your Laravel application
==================================================================================

[](#enable-authentication-against-saml-identity-providers-for-your-laravel-application)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1189ce459549ba8145abf3e8bdf705e7d654554d7d005bdbf98f9ffeeafcfbf0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6165726465732f6c61726176656c2d73616d6c6974652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aerdes/laravel-samlite)[![Build Status](https://camo.githubusercontent.com/bd2efe542e977afe0fc06c2b6cfc7f7e185d85b9a02aaaa0ec9364282f3b0aa5/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6165726465732f6c61726176656c2d73616d6c6974652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.com/github/aerdes/laravel-samlite)[![StyleCI](https://camo.githubusercontent.com/0c1fbb45d02feee7a1c4e3186c824c208a5d59630b719a47fc917bf4fcd2f439/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3236313433393333332f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/261439333)[![Total Downloads](https://camo.githubusercontent.com/d8cd14b5cce0ed6970315149f3ff5f38fa9e5a60d017dcca29b274f55082b97c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6165726465732f6c61726176656c2d73616d6c6974652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aerdes/laravel-samlite)

This package can be used to quickly add authentication against SAML2 identity providers to your Laravel application. This package thus makes your Laravel application a SAML2 service provider.

Please note that this package is based on [onelogin/php-saml](https://packagist.org/packages/onelogin/php-saml). It is similar to [aacotroneo/laravel-saml2](https://packagist.org/packages/aacotroneo/laravel-saml2) but as easy to use as [laravel/socialite](https://packagist.org/packages/laravel/socialite). It also tries to resemble the default Laravel authentication under the hood.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require aerdes/laravel-samlite
```

Usage
-----

[](#usage)

After installing the package make sure to set some environmental variables. For example, when you want to use [Microsoft Azure](https://portal.azure.com) as identity provider, please set up the following environmental variables:

```
SAML_IDP_AZURE_AD_IDENTIFIER=
SAML_IDP_AZURE_LOGIN_URL=
SAML_IDP_AZURE_LOGOUT_URL=
SAML_IDP_AZURE_CERT=
```

If your environmental file does not yet contain the variables `SAML_SP_PRIVATE_KEY` and `SAML_SP_CERT` also run:

```
php artisan saml:setup
```

You then want to create a Controller that extends the [authentication controller](src/Http/Controllers/SamlController.php) that ships with this package. Here is an example.

```
