PHPackages                             mehr-als-nix/zf2-saml - 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. mehr-als-nix/zf2-saml

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

mehr-als-nix/zf2-saml
=====================

SAML Authentication module for ZF-2.

1601PHP

Since Oct 14Pushed 9y ago2 watchersCompare

[ Source](https://github.com/MehrAlsNix/zf-saml)[ Packagist](https://packagist.org/packages/mehr-als-nix/zf2-saml)[ RSS](/packages/mehr-als-nix-zf2-saml/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

zf-saml
=======

[](#zf-saml)

SAML authentication module for ZF2.

[![Build Status](https://camo.githubusercontent.com/3814bc56eb035440189c0d94bf437039a818f3d5fa32223f15cf900b4157284d/68747470733a2f2f7472617669732d63692e6f72672f4d656872416c734e69782f7a662d73616d6c2e737667)](https://travis-ci.org/MehrAlsNix/zf-saml)

This module uses `onelogin/php-saml` internally and wrap the function in services.

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

[](#installation)

Just require `mehr-als-nix/zf-saml` in your `composer.json`.

Enable it in application.config.php

```
    'modules' => array (
        // ---88---
    ),

```

Configuration
-------------

[](#configuration)

Copy `saml.local.php.dist` to `config/autoload/saml.local.php`

Services
--------

[](#services)

### MehrAlsNix\\ZF\\SAML\\Service\\SAML2Auth

[](#mehralsnixzfsamlservicesaml2auth)

Provides an instance of `OneLogin_Saml2_Auth`

### MehrAlsNix\\ZF\\SAML\\Service\\SAML2AuthnRequest

[](#mehralsnixzfsamlservicesaml2authnrequest)

Provides an instance of `OneLogin_Saml2_AuthnRequest`

### MehrAlsNix\\ZF\\SAML\\Service\\SAML2Metadata

[](#mehralsnixzfsamlservicesaml2metadata)

Provides an instance of `OneLogin_Saml2_Metadata`

### MehrAlsNix\\ZF\\SAML\\Service\\SAML2Response

[](#mehralsnixzfsamlservicesaml2response)

Provides an instance of `OneLogin_Saml2_Response`

### MehrAlsNix\\ZF\\SAML\\Service\\SAML2Settings

[](#mehralsnixzfsamlservicesaml2settings)

Provides an instance of `OneLogin_Saml2_Settings`

API protection
--------------

[](#api-protection)

Assume `$this->samlAuth` contains an instance of `OneLogin_Saml2_Auth`, then you would be able to protect your API.

```
    if (!$this->samlAuth->isAuthenticated()) {
        $this->getResponse()->setStatusCode(401);
        return;
    }

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/197f7436c47067343def1d182dd597dbd104774fe17071e0b983487dc3652fe8?d=identicon)[siad007](/maintainers/siad007)

---

Top Contributors

[![siad007](https://avatars.githubusercontent.com/u/2149445?v=4)](https://github.com/siad007 "siad007 (46 commits)")

### Embed Badge

![Health badge](/badges/mehr-als-nix-zf2-saml/health.svg)

```
[![Health](https://phpackages.com/badges/mehr-als-nix-zf2-saml/health.svg)](https://phpackages.com/packages/mehr-als-nix-zf2-saml)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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