PHPackages                             asminog/yii2-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. asminog/yii2-saml

ActiveYii2-extension[Authentication &amp; Authorization](/categories/authentication)

asminog/yii2-saml
=================

Connect Yii 2 application to a Saml Identity Provider for Single Sign On

2.1.1(4y ago)07.1k↓100%1MITPHP

Since Jan 3Pushed 4y ago2 watchersCompare

[ Source](https://github.com/asminog/yii2-saml)[ Packagist](https://packagist.org/packages/asminog/yii2-saml)[ RSS](/packages/asminog-yii2-saml/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (2)Versions (18)Used By (0)

Yii 2 Saml
==========

[](#yii-2-saml)

[![Build Status](https://camo.githubusercontent.com/5d54a862028ea81f14a30337cb89a5d766325a36b4d386fe788a0ab80a1ee22a/68747470733a2f2f7472617669732d63692e6f72672f61736d696e6f672f796969322d73616d6c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/asminog/yii2-saml)

Connect Yii 2 application to a Saml Identity Provider for Single Sign On

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist asminog/yii2-saml "*"

```

or add

```
"asminog/yii2-saml": "*"

```

to the require section of your `composer.json` file.

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

[](#configuration)

Register `asminog\yii2saml\Saml` to your components in `config/web.php`.

```
'components' => [
    'saml' => [
        'class' => 'asminog\yii2saml\Saml',
        'configFileName' => '@app/config/saml.php', // OneLogin_Saml config file (Optional)
    ]
]
```

This component requires a `OneLogin_Saml` configuration stored in a php file. The default value for `configFileName` is `@app/config/saml.php` so make sure to create this file before. This file must returns the `OneLogin_Saml` configuration. See this [link](https://github.com/onelogin/php-saml/blob/master/settings_example.php) for example configuration.

```
