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

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

viktor-miller/laravel-basic-auth
================================

laravel basic authentication package

1.0.3(7y ago)0541MITPHPPHP &gt;=7.0

Since Jan 4Pushed 7y agoCompare

[ Source](https://github.com/viktor-miller/laravel-basic-auth)[ Packagist](https://packagist.org/packages/viktor-miller/laravel-basic-auth)[ RSS](/packages/viktor-miller-laravel-basic-auth/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Laravel HTTP Basic Authentication (BA)
--------------------------------------

[](#laravel-http-basic-authentication-ba)

This package activates the HTTP Basic Authentication mode in the application on Laravel &gt;= 5.4

After you call the command to activate the HTTP Basic Authentication mode, you will be asked to use the default authentication data from the configuration file. These data are permanent. Then you will be asked to use the temporary login data, which will be active only for the current mode. If you enter temporary data, it will be added to the data stack to the existing default login data from the config file (if you selected it). This allows you to have several keys to log in (for example permanent key for the admin and temporary for the customer). If you do not use the authentication data from the configuration file, you will be forced to enter the temporary login data every time. At the end you can enter an optional time interval in days and/or hours and/or minutes, after which the HTTP Basic Authentication mode will be automatically turned off.

### Features

[](#features)

- Artisan commands to turn on/off
- Configuration file for storing authentication data
- Support of forced logout. After reactivation, all logged on users will be forced to enter authentication data again.
- Multilanguage support (EN, DE, RU)
- Support to set temporary authentication data
- Support set a time limit (in Days, Hours or Minutes). At the end of this time, the HTTP Basic Authentication mode will be automatically turned off.

[![console](https://github.com/viktor-miller/laravel-basic-auth/raw/master/img/console.png)](https://github.com/viktor-miller/laravel-basic-auth/blob/master/img/console.png)[![auth](https://github.com/viktor-miller/laravel-basic-auth/raw/master/img/auth.png)](https://github.com/viktor-miller/laravel-basic-auth/blob/master/img/auth.png)

### Installation

[](#installation)

Add package to your **composer.json** file:

```
composer require viktor-miller/laravel-basic-auth

```

For Laravel &gt;= 5.4 add service provider to **config/app.php**

```
'providers' => [
    ViktorMiller\LaravelBasicAuth\ServiceProvider::class,
]
```

Call artisan command to publish config file

```
php artisan vendor:publish --tag=basic-auth:config

```

Change the configuration file **basic-auth.php** as you like

```
