定制 cloudmazing/filament-force-2fa 二次开发

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

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

cloudmazing/filament-force-2fa

最新稳定版本:2.1

Composer 安装命令:

composer require cloudmazing/filament-force-2fa

包简介

Force 2FA using a middleware

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Usage

The package exposes a middleware that forces the user to have 2FA enabled. If the user don't, they are redirected to the filament 2FA settings page (based on webbingbrasil/filament-2fa).

You can add the middleware to a middleware group (such as filament's auth group in config/filament.php which will always affect logged-in users).

    /*
    |--------------------------------------------------------------------------
    | Middleware
    |--------------------------------------------------------------------------
    |
    | You may customise the middleware stack that Filament uses to handle
    | requests.
    |
    */

    'middleware' => [
        'auth' => [
            // ...
            \CloudMazing\FilamentForce2FA\Http\Middleware\Require2FA::class,
        ],
        'base' => [
            //...
        ],
    ],

Or you can use the middleware on individual endpoints by registering in the Kernel App\Http\Kernel:

    protected $routeMiddleware = [
        //...
        '2fa' => \CloudMazing\FilamentForce2FA\Http\Middleware\Require2FA::class,
    ];

Then when declaring routes:

Route::middleware('2fa')->get('/hello');

Installation

You can install the package via composer:

composer require cloudmazing/filament-force-2fa

You can publish and run the migrations with:

php artisan vendor:publish --tag="filament-force-2fa-migrations"
php artisan migrate

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-12