PHPackages                             temp/saml2 - 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. temp/saml2

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

temp/saml2
==========

SAML2 PHP library from SimpleSAMLphp

v0.4.1(12y ago)09LGPL-2.1PHPPHP &gt;=5.3.3

Since Nov 5Pushed 12y ago1 watchersCompare

[ Source](https://github.com/rmahoney-bsd/saml2)[ Packagist](https://packagist.org/packages/temp/saml2)[ RSS](/packages/temp-saml2/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (7)Versions (7)Used By (0)

SimpleSAMLphp SAML2 library [![Build Status](https://camo.githubusercontent.com/cb5374bb886a563b96090e90423a4e5dd1f5a060f4c00baf776edee12b82fd8c/68747470733a2f2f7472617669732d63692e6f72672f73696d706c6573616d6c7068702f73616d6c322e706e673f6272616e63683d666561747572652f6669782d6275696c64)](https://travis-ci.org/simplesamlphp/saml2)
==========================================================================================================================================================================================================================================================================================================================================

[](#simplesamlphp-saml2-library-)

A PHP library for SAML2 related functionality. Extracted from [SimpleSAMLphp](http://www.simplesamlphp.org), used by [OpenConext](http://www.openconext.org). This library is a collaboration between [UNINETT](http://uninett.no) and [SURFnet](http://surfnet.nl).

Before you use it
-----------------

[](#before-you-use-it)

**DO NOT USE THIS LIBRARY UNLESS YOU ARE INTIMATELY FAMILIAR WITH THE SAML2 SPECIFICATION.**

If you are not familiar with the SAML2 specification and are simply looking to connect your application using SAML2, you should probably use [SimpleSAMLphp](http://www.simplesamlphp.org).

While this library is tagged as stable it is currently not very developer friendly and it's API is likely to change significantly in the future. It is however a starting point for collaboration between parties. So let us know what you would like to see in a PHP SAML2 library.

Note that the **HTTP Artifact Binding and SOAP client not work** outside of SimpleSAMLphp.

Usage
-----

[](#usage)

- Install with [Composer](http://getcomposer.org/doc/00-intro.md), add the following in your composer.json:

```
{
    "require": {
        "simplesamlphp/saml2": "0.1.*"
    }
}
```

Then run `composer update`.

- Provide the required external dependencies by extending and implementing the `SAML2_Compat_AbstractContainer`then injecting it in the ContainerSingleton (see example below).
- Use at will. Example:

```
    // Use Composers autoloading
    require 'vendor/autoload.php';

    // Implement the Container interface (out of scope for example)
    require 'container.php';
    SAML2_Compat_ContainerSingleton::setContainer($container);

    // Set up an AuthnRequest
    $request = new SAML2_AuthnRequest();
    $request->setId(SAML2_Utils::generateId());
    $request->setIssuer('https://sp.example.edu');
    $request->setDestination('https://idp.example.edu');

    // Send it off using the HTTP-Redirect binding
    $binding = new SAML2_HTTPRedirect();
    $binding->send($request);
```

License
-------

[](#license)

This library is licensed under the LGPL license version 2.1. For more details see [LICENSE](https://raw.github.com/simplesamlphp/saml2/master/LICENSE).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.6% 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.

###  Release Activity

Cadence

Every ~22 days

Recently: every ~28 days

Total

6

Last Release

4461d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c226b583be45668706c5d6ad8088d52410a15daa9f5e9c4db126f256d4131d3?d=identicon)[rmahoney-bsd](/maintainers/rmahoney-bsd)

---

Top Contributors

[![olavmrk](https://avatars.githubusercontent.com/u/349658?v=4)](https://github.com/olavmrk "olavmrk (1673 commits)")[![andreassolberg](https://avatars.githubusercontent.com/u/101361?v=4)](https://github.com/andreassolberg "andreassolberg (1099 commits)")[![jaimeperez](https://avatars.githubusercontent.com/u/1942728?v=4)](https://github.com/jaimeperez "jaimeperez (65 commits)")[![lon](https://avatars.githubusercontent.com/u/462659?v=4)](https://github.com/lon "lon (36 commits)")[![soyunalavadora](https://avatars.githubusercontent.com/u/133754?v=4)](https://github.com/soyunalavadora "soyunalavadora (18 commits)")[![olavmo-sikt](https://avatars.githubusercontent.com/u/98447575?v=4)](https://github.com/olavmo-sikt "olavmo-sikt (4 commits)")[![jas4711](https://avatars.githubusercontent.com/u/531817?v=4)](https://github.com/jas4711 "jas4711 (2 commits)")[![relaxnow](https://avatars.githubusercontent.com/u/524386?v=4)](https://github.com/relaxnow "relaxnow (2 commits)")[![rmahoney-bsd](https://avatars.githubusercontent.com/u/6912313?v=4)](https://github.com/rmahoney-bsd "rmahoney-bsd (2 commits)")[![tamlyn](https://avatars.githubusercontent.com/u/115310?v=4)](https://github.com/tamlyn "tamlyn (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/temp-saml2/health.svg)

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

###  Alternatives

[google/auth

Google Auth Library for PHP

1.4k272.7M162](/packages/google-auth)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[litesaml/lightsaml

SAML 2.0 PHP library

1055.5M18](/packages/litesaml-lightsaml)[simplesamlphp/saml2

SAML2 PHP library from SimpleSAMLphp

30317.2M40](/packages/simplesamlphp-saml2)[web-auth/webauthn-lib

FIDO2/Webauthn Support For PHP

1195.3M72](/packages/web-auth-webauthn-lib)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

50570.7k1](/packages/web-auth-webauthn-framework)

PHPackages © 2026

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