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 1mo 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 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

954d 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

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[codegreencreative/laravel-samlidp

Make your PHP Laravel application an Identification Provider using SAML 2.0. This package allows you to implement your own Identification Provider (idP) using the SAML 2.0 standard to be used with supporting SAML 2.0 Service Providers (SP).

263763.5k1](/packages/codegreencreative-laravel-samlidp)[jurager/teams

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

22817.3k](/packages/jurager-teams)[codebot/entrust

This package provides a flexible way to add Role-based Permissions to Laravel

1596.6k](/packages/codebot-entrust)[setiawanhu/sanctum-auth

Laravel package for generating user authentication feature using Laravel Sanctum

132.8k](/packages/setiawanhu-sanctum-auth)

PHPackages © 2026

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