PHPackages                             icalab/yii2-ica-authentication - 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. icalab/yii2-ica-authentication

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

icalab/yii2-ica-authentication
==============================

Extension for authenticating and managing users, built on top of the default YII2 RBAC mechanism.

0456PHP

Since May 26Pushed 10y ago1 watchersCompare

[ Source](https://github.com/icalab/yii2-ica-authentication)[ Packagist](https://packagist.org/packages/icalab/yii2-ica-authentication)[ RSS](/packages/icalab-yii2-ica-authentication/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-ica-authentication
=======================

[](#yii2-ica-authentication)

Authentication mechanism for Yii-based projects. Provides a password reset mechanism and an editor for assigning roles. Updated for Yii 2

Usage:
------

[](#usage)

This authentication mechanism extends the default Yii 2 RBAC mechanism (see: ) and more specifically the DbManager (see ). Configure these and don't forget to initialize the database using the command

```
php yii migrate --migrationPath=@yii/rbac/migrations/

```

Note you will also need to add authentication config to your console config.

Next, setup i18n, both in your console config and in your web config.

Once you've done all that, run the migration:

```
php yii migrate --migrationPath=@icalab/auth/migrations

```

Next run the init command:

```
php yii ica-init-auth

```

This will set up the user table and the resetpassword table. It will also create an admin user with  as the email / login and "admin" as the password and the roles that are required for editing and updating other users.

Next you will have to tell the application to use the ICALab User model instead of the default one. Change:

```
'user' => [
            'identityClass' => 'app\models\User',
            'enableAutoLogin' => true,
        ],

```

To:

```
'user' => [
            'identityClass' => 'icalab\auth\models\User',
            'enableAutoLogin' => true,
        ],

```

You also need to make the default SiteController use the ICALab LoginForm model instead of the default one. Change:

```
use app\models\LoginForm;

```

To:

```
use icalab\auth\models\LoginForm;

```

The URL for adding a new user is user/create.

The URL for listing existing users is user/index.

Users can request new passwords by first calling password-reset-generate with a post variable named email. If the email address points to a known user, a new reset token is generated and an email message is sent out containing the link to the reset page. If the email address is unknown, nothing happens. In both cases, no output is generated.

TODO:
-----

[](#todo)

This is a quick update of the Yii 1 ICA Authentication mechanism (). Since we're in a hurry the editor for roles and permissions has not been implemented yet. Tests also have not been implemented yet. However, it does work and has been proven useful in a number of projects already.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.6% 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/c731173164e8e4e594ff37404aa6840784699fdaa293021ddb82be23c919f454?d=identicon)[icalab](/maintainers/icalab)

---

Top Contributors

[![matthijs-rhmtts](https://avatars.githubusercontent.com/u/195130236?v=4)](https://github.com/matthijs-rhmtts "matthijs-rhmtts (7 commits)")[![mcdejonge](https://avatars.githubusercontent.com/u/7314582?v=4)](https://github.com/mcdejonge "mcdejonge (4 commits)")

### Embed Badge

![Health badge](/badges/icalab-yii2-ica-authentication/health.svg)

```
[![Health](https://phpackages.com/badges/icalab-yii2-ica-authentication/health.svg)](https://phpackages.com/packages/icalab-yii2-ica-authentication)
```

###  Alternatives

[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)

PHPackages © 2026

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