PHPackages                             intraset/laravel-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. intraset/laravel-basic-auth

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

intraset/laravel-basic-auth
===========================

Basic authentication using master credentials for the application.

v1.0.0(2y ago)184MITPHPPHP ^8.0

Since Oct 1Pushed 2y ago1 watchersCompare

[ Source](https://github.com/emyasnikov/laravel-basic-auth)[ Packagist](https://packagist.org/packages/intraset/laravel-basic-auth)[ Docs](https://github.com/intraset/laravel-basic-auth)[ RSS](/packages/intraset-laravel-basic-auth/feed)WikiDiscussions dev Synced 2d ago

READMEChangelog (3)Dependencies (4)Versions (5)Used By (0)

Laravel Basic Auth
==================

[](#laravel-basic-auth)

[![Latest Version on Packagist](https://camo.githubusercontent.com/364f69681dce72fcd444f2ac1862a2ab17bd2e11bdc12a6bdf159e41789de575/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e7472617365742f6c61726176656c2d62617369632d617574682e7376673f7374796c653d666c6174)](https://packagist.org/packages/intraset/laravel-basic-auth)[![MIT Licensed](https://camo.githubusercontent.com/f251623e510f5909f16ae3f4e6e548dac11340b9fde1a99be26b015b39272c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c6174)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/7055f91615ad919c52f941e2bd71914d47502bbcd0ebac0f1f20e8337bdf8824/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e7472617365742f6c61726176656c2d62617369632d617574682e7376673f7374796c653d666c6174)](https://packagist.org/packages/intraset/laravel-basic-auth)

Basic authentication using master credentials for the application.

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

[](#installation)

```
composer require intraset/laravel-basic-auth
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --provider="Intraset\LaravelBasicAuth\ServiceProvider"
```

Usage
-----

[](#usage)

Activate the middleware in the .env file:

```
BASIC_AUTH_ENABLED=true
```

Set the master credentials in the .env file:

```
BASIC_AUTH_USERNAME=admin
BASIC_AUTH_PASSWORD=secret
```

Change the middleware alias in the .env file:

```
BASIC_AUTH_ALIAS=basic.auth
```

Change the middleware behavior to be applied to the application globally in the .env file:

```
BASIC_AUTH_GLOBAL=true
```

Change the middleware behavior to be applied to the middleware group in the .env file:

```
BASIC_AUTH_GROUP=web
```

Middleware
----------

[](#middleware)

The middleware can be used in the following ways:

```
Route::get('/', function () {
    //
})->middleware('basic.auth');
```

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Evgenij Myasnikov](https://github.com/emyasnikov)

License
-------

[](#license)

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

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Total

3

Last Release

1002d ago

Major Versions

v0.2.0 → v1.0.02023-10-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/78e824cde6744001056fad19a46f5baf094d398b2db6de8121307b5da3d43151?d=identicon)[Warl](/maintainers/Warl)

---

Top Contributors

[![emyasnikov](https://avatars.githubusercontent.com/u/11491236?v=4)](https://github.com/emyasnikov "emyasnikov (44 commits)")

---

Tags

laravelauthbasic

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/intraset-laravel-basic-auth/health.svg)

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

###  Alternatives

[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

84611.1M64](/packages/php-open-source-saver-jwt-auth)[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5752.3M18](/packages/directorytree-ldaprecord-laravel)[jurager/teams

Laravel package to manage team functionality and operate with user permissions.

23822.5k](/packages/jurager-teams)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6804.7k6](/packages/hasinhayder-tyro)[srlabs/centaur

An opinionated implementation of Cartalyst's Sentinel for Laravel 5

6058.3k](/packages/srlabs-centaur)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1563.1k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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