承接 juliomotol/filament-password-confirmation 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

juliomotol/filament-password-confirmation

最新稳定版本:v1.2.0

Composer 安装命令:

composer require juliomotol/filament-password-confirmation

包简介

Prompt users to re-enter their password before performing sensitive actions.

README 文档

README

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

Simplifies adding a secure password confirmation step to your admin panels.

  • Prompts users to re-enter their password before performing sensitive actions.
  • Increases security by preventing accidental or unauthorized actions due to long session times.
  • Easy to integrate and highly configurable.

Installation

You can install the package via composer:

composer require juliomotol/filament-password-confirmation

Then add the plugin to your panel.

JulioMotol\FilamentPasswordConfirmation\FilamentPasswordConfirmationPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
       ->plugin(FilamentPasswordConfirmationPlugin::make());
}

You can configure the route name, uri, middleware and password timeout duration.

FilamentPasswordConfirmationPlugin::make()
    ->routeName('confirm')
    ->routeUri('auth/confirm')
    ->routeMiddleware(FooMiddleware::class) // Accepts string|array
    ->passwordTimeout(10800) // Accepts int|null that represents the amount of seconds

Optionally, you can publish the translations and views using.

php artisan vendor:publish --tag="filament-password-confirmation-translations"
php artisan vendor:publish --tag="filament-password-confirmation-views"

Usage

Simply use RequiresPasswordConfirmation in your pages/resources.

use JulioMotol\FilamentPasswordConfirmation\RequiresPasswordConfirmation;

class AdminResource extends Resource
{
    use RequiresPasswordConfirmation;
    ...
}

You can configure the password confirmation timeout within your page/resource.

use JulioMotol\FilamentPasswordConfirmation\RequiresPasswordConfirmation;

class AdminResource extends Resource
{
    use RequiresPasswordConfirmation;

    protected static ?int $passwordTimeout = 360; // the amount of seconds
    ...
}

NOTE: The password timeout duration is determined in the following order until it encounters a non-null value.

  1. $passwordTimeout property in the page/resource
  2. passwordTimeout() configured in the plugin during registry
  3. auth.password_timeout config assigned in config/auth.php

Testing

composer test

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.

统计信息

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

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-17