PHPackages                             webtoolsnz/yii2-require-login - 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. webtoolsnz/yii2-require-login

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

webtoolsnz/yii2-require-login
=============================

Simple component that enforces a blanket authentication requirement for all controller/actions.

1.0.5(10y ago)067.2k—7%proprietaryPHP

Since Jun 26Pushed 2y ago14 watchersCompare

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

READMEChangelog (1)Dependencies (2)Versions (12)Used By (0)

Require Login for Yii2 Application
==================================

[](#require-login-for-yii2-application)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4f1eca970af1fc8d650cce5d4462fc6c699e9b542f8da216e41e1ae6d4451a4b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f776562746f6f6c736e7a2f796969322d726571756972652d6c6f67696e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d617374657226733d63333164323538313932343061623835613164306532393832386634383031303939666366616632)](https://scrutinizer-ci.com/g/webtoolsnz/yii2-require-login/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/567606f64eb7918104a92f8dae2f895cf14a7c1afb4fada4f1577b287bb0702d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f776562746f6f6c736e7a2f796969322d726571756972652d6c6f67696e2f6261646765732f636f7665726167652e706e673f623d6d617374657226733d37643262613037353233623936323439303532666163383139666166353739363236393266653836)](https://scrutinizer-ci.com/g/webtoolsnz/yii2-require-login/?branch=master)[![Build Status](https://camo.githubusercontent.com/afbac705f2e3c31c872122d5332610fed381e8639bd1ab3465a34b85493b2b23/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f776562746f6f6c736e7a2f796969322d726571756972652d6c6f67696e2f6261646765732f6275696c642e706e673f623d6d617374657226733d34333937613433343439316139306638396639646538663438363835393835373164623462363562)](https://scrutinizer-ci.com/g/webtoolsnz/yii2-require-login/build-status/master)

Simple component that enforces a blanket authentication requirement for all controller/actions.

Provides a configurable list of exceptions.

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

[](#installation)

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

Add the following to your `composer.json` file.

```
    "require" : {
        "webtoolsnz/yii2-require-login": "*"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.webtools.nz"
        }
    ]

```

Configuration Examples
----------------------

[](#configuration-examples)

### Basic Configuration

[](#basic-configuration)

```
...
'components' => [
    'requireLogin' => [
        'class' => 'webtoolsnz\RequireLogin\Component',
    ]
],
...

```

### Custom Exception List

[](#custom-exception-list)

`yii2-require-login` will by default provide a list of basic route exceptions including: `login` `logout`you can override this list with your own list using the below config.

```
...
'components' => [
    'requireLogin' => [
        'class' => 'webtoolsnz\RequireLogin\Component',
        'exceptions' => [
            '/login',
            '/logout',
            '/my-controller/foo'
        ]
    ]
],
...

```

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity70

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~27 days

Recently: every ~47 days

Total

11

Last Release

3710d ago

Major Versions

0.1.5 → 1.0.02015-09-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/a002d46764f9a0765a077837aec2e53e940607948ef3304be02adc0310f64d50?d=identicon)[webtools-machine-user](/maintainers/webtools-machine-user)

---

Top Contributors

[![brucealdridge](https://avatars.githubusercontent.com/u/57298?v=4)](https://github.com/brucealdridge "brucealdridge (2 commits)")

---

Tags

yii2componentrequire-login

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/webtoolsnz-yii2-require-login/health.svg)

```
[![Health](https://phpackages.com/badges/webtoolsnz-yii2-require-login/health.svg)](https://phpackages.com/packages/webtoolsnz-yii2-require-login)
```

###  Alternatives

[yii2mod/yii2-rbac

RBAC management module for Yii2

150351.4k7](/packages/yii2mod-yii2-rbac)[rmrevin/yii2-ulogin

Extension for yii2 ulogin integration

1811.9k](/packages/rmrevin-yii2-ulogin)[kakadu-dev/yii2-jwt-auth

Extension provide JWT auth for Yii2

105.8k](/packages/kakadu-dev-yii2-jwt-auth)

PHPackages © 2026

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