PHPackages                             yard/samlbase - 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. yard/samlbase

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

yard/samlbase
=============

Library for SAML2 Service Providers in PHP

v1.7.0(1y ago)0414↓33.3%1OSL-3.0PHPPHP ^7.4 || ^8.1

Since Aug 14Pushed 1y ago3 watchersCompare

[ Source](https://github.com/yardinternet/samlbase)[ Packagist](https://packagist.org/packages/yard/samlbase)[ Docs](https://github.com/GoGentoOSS/SAMLBase)[ RSS](/packages/yard-samlbase/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (3)Used By (1)

SAMLBase
========

[](#samlbase)

\##Introduction Build a feature rich SAML Service Provider that is able to communicate to literally any SAML2 Identity Provider. It covers almost the full scope of SAML2 and the base is increasing.

The library is used to connect global market leaders to their SAML2 Identity Providers.

\##Features

1. Resolve the Metadata from the Identity Provider
2. Automatic Service Provider Metadata to exchange with the Identity Provider
3. Authenticate via POST and Redirect Bindings
4. Assertion Consumer Service
5. Artifact Resolution with Redirect and POST Bindings using HTTP-Artifact
6. Handle the Authentication response from the Identity Provider
7. Single Logout via POST and Redirect
8. Identity Provider initiated Single Logout
9. Attributes mapping
10. Sign and Verify all requests and metadata
11. Multiple NameID Formats
12. Encryption and Decryption

\##Setup composer require gogentooss/samlbase

Coming soon
-----------

[](#coming-soon)

```
1. Add Scoping and Conditions to AuthnRequest
2. Add AttributeQuery and AttributeResponse
3. Apply Assertions
4. Support multiple identifier types (BaseID, NameID, EncryptedID)
5. Add Statement Element support
6. Add Advice Element support
7. Increase the SAML2 scope compatibility of the library (Continuous, version 1.1.0 has a lot of these already)
8. Add the SOAP Binding for ACS

```

Examples (relative to package root)
-----------------------------------

[](#examples-relative-to-package-root)

```
/example/metadata.php - Service Provider Metadata
/example/index.php - Example AuthNRequest (Redirect and POST binding)
/example/response.php - Example AuthNResponse target file (POST Binding)
/example/attributes.php - WIP AttributeQuery request after being logged in (requires attributequery service on the IDP)
/example/logout.php - Logout request
/example/logoutresponse.php - Example LogoutResponse handling

```

License information
-------------------

[](#license-information)

```
This code is released under the OSL v3 license
Info about the license can be found here:  https://opensource.org/licenses/OSL-3.0

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance44

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~196 days

Total

2

Last Release

446d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/62775?v=4)[Anton Zhuravsky](/maintainers/Yard)[@yard](https://github.com/yard)

---

Top Contributors

[![ictbeheer](https://avatars.githubusercontent.com/u/14947039?v=4)](https://github.com/ictbeheer "ictbeheer (5 commits)")

---

Tags

phpSSOSAML2SAMLBase

### Embed Badge

![Health badge](/badges/yard-samlbase/health.svg)

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

###  Alternatives

[simplesamlphp/simplesamlphp

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

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[onelogin/php-saml

PHP SAML Toolkit

1.3k44.0M107](/packages/onelogin-php-saml)[gogentooss/samlbase

Library for SAML2 Service Providers in PHP

1220.7k](/packages/gogentooss-samlbase)[litesaml/lightsaml

SAML 2.0 PHP library

1055.5M18](/packages/litesaml-lightsaml)[kinde-oss/kinde-auth-php

Kinde PHP SDK for authentication

2369.5k3](/packages/kinde-oss-kinde-auth-php)[maicol07/flarum-ext-sso

SSO for Flarum

468.3k](/packages/maicol07-flarum-ext-sso)

PHPackages © 2026

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