PHPackages                             skeeks/yii2-http-basic-auth - 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. [Framework](/categories/framework)
4. /
5. skeeks/yii2-http-basic-auth

ActiveYii2-extension[Framework](/categories/framework)

skeeks/yii2-http-basic-auth
===========================

Http basic auth for Yii2 project

1.0.0.1(7y ago)211.6k↓64.8%BSD-3-ClausePHP

Since Apr 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/skeeks-semenov/yii2-http-basic-auth)[ Packagist](https://packagist.org/packages/skeeks/yii2-http-basic-auth)[ Docs](http://cms.skeeks.com/)[ RSS](/packages/skeeks-yii2-http-basic-auth/feed)WikiDiscussions master Synced yesterday

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

Http basic auth for Yii2 project
================================

[](#http-basic-auth-for-yii2-project)

[![Latest Stable Version](https://camo.githubusercontent.com/dd9fabbc1206df45c1ac5b5b848b9d3b2e8b6484ac3c3dafac3a708dc2df420f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736b65656b732f796969322d687474702d62617369632d617574682e737667)](https://packagist.org/packages/skeeks/yii2-http-basic-auth)[![Total Downloads](https://camo.githubusercontent.com/1056a9c896ea68da38fedbe293da0fc185d8f1528fc962696a3476e204439f27/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736b65656b732f796969322d687474702d62617369632d617574682e737667)](https://packagist.org/packages/skeeks/yii2-http-basic-auth)

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist skeeks/yii2-http-basic-auth "*"

```

or add

```
"skeeks/yii2-http-basic-auth": "*"

```

Configuration app
-----------------

[](#configuration-app)

Exemple 1
---------

[](#exemple-1)

```
'on beforeRequest' => function ($event) {
    \Yii::$app->httpBasicAuth->verify();
},

'components' =>
[
    'httpBasicAuth' =>
    [
        'class'             => 'skeeks\yii2\httpBasicAuth\HttpBasicAuthComponent',
        'login'             => 'login',
        'password'          => 'password',
        'usePasswordHash'   => false,                               //optionality
        'viewFail'          => '@app/views/http-basic-auth-fail'    //optionality
    ],

]
```

Exemple 2
---------

[](#exemple-2)

```
'on beforeRequest' => function ($event) {
    //For example in addition to close the admin panel http authorization
    if (\Yii::$app->admin->requestIsAdmin)
    {
        \Yii::$app->httpBasicAuth->verify();
    }
},

'components' =>
[
    'httpBasicAuth' =>
    [
        'class'             => 'skeeks\yii2\httpBasicAuth\HttpBasicAuthComponent',
        'login'             => 'login',
        'password'          => 'password',
    ],

]
```

---

> [![skeeks!](https://camo.githubusercontent.com/e80b006782c0ce0ce23f8e2e2530130e856f2f49c6a5a8e0e15eaf0c87d25d7b/68747470733a2f2f736b65656b732e636f6d2f696d672f6c6f676f2f6c6f676f2d6e6f2d7469746c652d383070782e706e67)](https://skeeks.com)
> *SkeekS CMS (Yii2) — quickly, easily and effectively!*
> [skeeks.com](https://skeeks.com) | [cms.skeeks.com](https://cms.skeeks.com)

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

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 ~1012 days

Total

2

Last Release

2716d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/785306737dd13e3ea6826dfc04ab29ececa88f560d054ff595d64853cb878219?d=identicon)[skeeks-semenov](/maintainers/skeeks-semenov)

---

Top Contributors

[![skeeks-semenov](https://avatars.githubusercontent.com/u/9209305?v=4)](https://github.com/skeeks-semenov "skeeks-semenov (14 commits)")

---

Tags

authskeeksskeeks-cmsyiiyii2yii2-authyii2-extensionframeworkskeeksyiicomponenthttp basic auth

### Embed Badge

![Health badge](/badges/skeeks-yii2-http-basic-auth/health.svg)

```
[![Health](https://phpackages.com/badges/skeeks-yii2-http-basic-auth/health.svg)](https://phpackages.com/packages/skeeks-yii2-http-basic-auth)
```

PHPackages © 2026

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