定制 sven/super-basic-auth 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sven/super-basic-auth

最新稳定版本:v2.6.0

Composer 安装命令:

composer require sven/super-basic-auth

包简介

A lightweight package to add basic authentication to your Laravel app.

README 文档

README

super-basic-auth

Super Basic Auth

Latest Version on Packagist Total Downloads Software License Build Status StyleCI

This is a super lightweight package to add the most basic form of authentication to your Laravel app. All you need is a webserver and a text editor!

Installation

The installation instructions for this package can be found below.

Downloading

Via composer:

$ composer require sven/super-basic-auth

Or add the package to your dependencies in composer.json and run composer update on the command line to download it:

{
    "require": {
        "sven/super-basic-auth": "^2.3"
    }
}

Usage

To use this package, first add the following code to your config/auth.php file:

return [
    // ...

    'basic' => [
        'user' => env('AUTH_USERNAME'),
        'password' => env('AUTH_PASSWORD'),
    ],
];

Be sure to add AUTH_USERNAME and AUTH_PASSWORD to your .env file. You can call these entries whatever you want.

Finally, apply the middleware to any route you want protected by those credentials:

Route::group('admin', function () {
    // Your password protected routes.
})->middleware(\Sven\SuperBasicAuth\SuperBasicAuth::class);

Contributing

All contributions (pull requests, issues and feature requests) are welcome. Make sure to read through the CONTRIBUTING.md first, though. See the contributors page for all contributors.

License

sven/super-basic-auth is licensed under the MIT License (MIT). Please see the license file for more information.

统计信息

  • 总下载量: 2.32k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 23
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 23
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-10-15