PHPackages                             trandat1001/yii2-simplesamlphp - 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. trandat1001/yii2-simplesamlphp

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

trandat1001/yii2-simplesamlphp
==============================

Integrate simplesamlphp/simplesamlphp into Yii 2 application

153PHP

Since Sep 6Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Yii Simplesamlphp
-----------------

[](#yii-simplesamlphp)

\###1. Installation

Download or clone this repot then extract to `extensions`. Register `components/Simplesaml.php` as a component. It needs 2 arguments, `autoloadPath` where your simplesamlphp sp's `lib/_autoload.php` is and `authSource` the authentication source that you will use on your `config/authsources.php`

```
// on config/main.php
'components' => array(
	  'simplesamlphp' => array(
          'class' => 'ext.yii-simplesamlphp.components.Simplesamlphp',
          'autoloadPath' => 'SIMPLESAMLPHP_SP_PATH/lib/_autoload.php',
          'authSource' => 'default-sp',
      ),

     //your other components
),
```

\###2. Usage

- Using [simplesamlphp sp's api](https://simplesamlphp.org/docs/stable/simplesamlphp-sp-api)

Now you can use the api simply by call `Yii::app()->componentName->method_name()`.

- Login and logout action

You can use our `LoginAction` and `LogoutAction` to login and logout your application with Simplesamlphp. All you need to do is create method `actions` on your controller and add `LoginAction` and `LogoutAction`.

```
// on your controller
class SiteController extends Controller {

    public function actions() {
        return array(
  	          'login' => array(
  	              'class' => 'ext.yii-simplesamlphp.actions.LoginAction',
  	              'simplesamlphpComponentName' => 'simplesamlphp',
  	              'redirectAfterLoginTo' => array('/'),
  	          ),
  	          'logout' => array(
  	              'class' => 'ext.yii-simplesamlphp.actions.LogoutAction',
  	              'simplesamlphpComponentName' => 'simplesamlphp',
  	              'redirectAfterLogoutTo' => array('/'),
  	          ),
          );
    }

    //your other actions

}
```

Now you can login via `site/login` and logout via `site/logout`. You need to specify `simplesamlphpComponentName` with your component name which you register `components/Simplesamlphp.php` and `redirectAfterLogin` and `redirectAfterLogout` with a route where you want to be redirected after login / logout.

\###3. Example

You can install [Yii Simplesamlphp Example](https://github.com/asasmoyo/yii-simplesamlphp-example) to try this extension.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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/2874148c3bd54da92be3285dc6b2182dfeceb32ecf30bbbd2982e60eaf555240?d=identicon)[trandat1001](/maintainers/trandat1001)

---

Top Contributors

[![trandat1001](https://avatars.githubusercontent.com/u/10475131?v=4)](https://github.com/trandat1001 "trandat1001 (7 commits)")

### Embed Badge

![Health badge](/badges/trandat1001-yii2-simplesamlphp/health.svg)

```
[![Health](https://phpackages.com/badges/trandat1001-yii2-simplesamlphp/health.svg)](https://phpackages.com/packages/trandat1001-yii2-simplesamlphp)
```

###  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)
