PHPackages                             mdmahbubhelal/config-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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. mdmahbubhelal/config-basic-auth

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

mdmahbubhelal/config-basic-auth
===============================

Provides basic auth using a config file for credentials

1.0.1(4y ago)014MITPHP

Since Apr 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/mdmahbubhelal/config-basic-auth)[ Packagist](https://packagist.org/packages/mdmahbubhelal/config-basic-auth)[ RSS](/packages/mdmahbubhelal-config-basic-auth/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Adds basic auth globally in Laravel application, uses credentials from config
=============================================================================

[](#adds-basic-auth-globally-in-laravel-application-uses-credentials-from-config)

Useful mostly in staging scenarios where you don't want website publicly accessible by everyone.

Default credentials are:

```
username: user0
password: password0

```

```
username: user1
password: password1

```

Installation
============

[](#installation)

`composer require mdmahbubhelal/config-basic-auth --dev`

Configuration
=============

[](#configuration)

you can publish config by running:

`php artisan vendor:publish --provider="MdMahbubHelal\ConfigBasicAuth\ConfigBasicAuthServiceProvider" --tag="config"`

that will publish `basicauth.php` file in `config` directory

Basic auth can be disabled by adding `BASICAUTH_ENABLED=false` in .env

You can change the username and password in the users array:

```
'users' => [
    [
        'username' => 'user0',
        'password' => 'password0',
    ],
    [
        'username' => 'user1',
        'password' => 'password1',
    ]
],

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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.

###  Release Activity

Cadence

Every ~3 days

Total

2

Last Release

1491d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7133d7d156fc25a67474a27228a17475407b62ed2308a6e51c8f3a35407fbada?d=identicon)[mahbub\_helal](/maintainers/mahbub_helal)

---

Top Contributors

[![mahbubhelal](https://avatars.githubusercontent.com/u/7233764?v=4)](https://github.com/mahbubhelal "mahbubhelal (3 commits)")

---

Tags

laravelconfigbasic auth

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mdmahbubhelal-config-basic-auth/health.svg)

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

###  Alternatives

[imdhemy/laravel-purchases

The top-notch Laravel receipt validator.

3831.1M2](/packages/imdhemy-laravel-purchases)[martbock/laravel-diceware

Diceware Passphrase Generator for Laravel

3264.7k](/packages/martbock-laravel-diceware)[orchestra/auth

Auth Component for Orchestra Platform

24108.5k3](/packages/orchestra-auth)[ingria/laravel-x509-auth

Laravel 5 Client Certificate auth middleware

375.6k](/packages/ingria-laravel-x509-auth)

PHPackages © 2026

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