PHPackages                             philwilliammee/samlserviceprovider - 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. philwilliammee/samlserviceprovider

ActiveLibrary

philwilliammee/samlserviceprovider
==================================

A laravel package for SAML 2.0 Service Provider (SP) authentication

02PHP

Since Apr 18Pushed 4y ago1 watchersCompare

[ Source](https://github.com/philwilliammee/samlserviceprovider)[ Packagist](https://packagist.org/packages/philwilliammee/samlserviceprovider)[ RSS](/packages/philwilliammee-samlserviceprovider/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

SamlServiceProvider
===================

[](#samlserviceprovider)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3c08340fc96dbf74c3fd638fec83a50d5051c60f19a694063e98ac401553945b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068696c77696c6c69616d6d65652f73616d6c7365727669636570726f76696465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/philwilliammee/samlserviceprovider)[![Total Downloads](https://camo.githubusercontent.com/2f8e9ae589f4288331dc7c68dc5a677bf5888f75b6942cdb21f6f4ef9b306330/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068696c77696c6c69616d6d65652f73616d6c7365727669636570726f76696465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/philwilliammee/samlserviceprovider)

SAML2.0 Service Provider Laravel Package, use this package to log into a IDP with SAML2.0. Please feel free to contribute to this package. This package has had minimal testing, and provides no security guarantees. Use at your own risk.

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

[](#installation)

Via Composer

```
composer require philwilliammee/samlserviceprovider
```

Usage
-----

[](#usage)

Run the migrations

```
 php artisan migrate
```

Publish Config and Views with

```
php artisan vendor:publish --provider="PhilWilliammee\SamlServiceProvider\SamlServiceProviderServiceProvider"
```

Edit the config file in `config/samlserviceprovider.php` to your liking.

This package comes with some blade templates that you can use to get you started. You can review them in `resources/views/vendor/philwilliammee`

example usage:

```

        Login

        Logout

```

then in the user controller call:

```
    $session_id = session()->getId();
    $user_attributes = SamlServiceProvider::getAttributes($session_id);
```

You will then probably want to login the user with Laravel, something like this:

```
    $email = $user_attributes['mail'][0];
    $name = $user_attributes['displayName'][0];
    $user = User::where('email', $email)->first();
    if (!$user) {
        $user = User::create([
            'email' => $email,
            'name' => $name,
        ]);
    }
    Auth::login($user);
```

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Phil Williammee](https://github.com/philwilliammee)

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ecfa6dfa37918d6b64a52b1d89d3044cb0df0ddce472f44e105c62ec45b92de2?d=identicon)[philwilliammee](/maintainers/philwilliammee)

---

Top Contributors

[![philwilliammee](https://avatars.githubusercontent.com/u/4685094?v=4)](https://github.com/philwilliammee "philwilliammee (16 commits)")

### Embed Badge

![Health badge](/badges/philwilliammee-samlserviceprovider/health.svg)

```
[![Health](https://phpackages.com/badges/philwilliammee-samlserviceprovider/health.svg)](https://phpackages.com/packages/philwilliammee-samlserviceprovider)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
