Search by

php-sso / saml

waltertamboer

SAML 2.0 for PHP applications. Sign people in through a company's identity provider (service provider role); the application's connections and request storage sit behind interfaces you implement.

Package info

github.com/php-sso/saml

pkg:composer/php-sso/saml

Statistics

Installs: 58

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-11-21 15:38 UTC

This package is auto-updated.

Last update: 2026-11-22 00:31:39 UTC


README

SAML 2.0 for PHP applications. Today it covers one role, the service provider: people sign in to your application through their company's identity provider (Okta, Entra, ADFS, Keycloak and others). The identity provider role (your application vouching for people at another SSO instance) is not built; it would live next to this one in PhpSso\Saml\IdentityProvider, sharing the SAML plumbing.

  • The XML and signature work is done by onelogin/php-saml, never by hand-written XML signature code. This package decides what to ask of it and what to trust.
  • No framework and no HTTP layer: you pass in the posted SAMLResponse and the browser's cookie and get an identity back. Your connections and your request storage are interfaces you implement.

Install

composer require php-sso/saml

PHP 8.2 or newer, with ext-dom, ext-mbstring and ext-openssl.

Documentation

The documentation is at https://php-sso.github.io/saml/:

The pages are in docs/content, built with Hugo and the php-sso docs theme. Preview them with hugo server --source docs.

Development

composer install
composer check     # phpstan, then phpunit

The tests build real signed answers with a fake identity provider (tests/support/IdpFixture.php) and run SignIn against in-memory implementations of both interfaces.

License

MIT. See LICENSE.