定制 smorken/pin-auth 二次开发

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

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

smorken/pin-auth

最新稳定版本:v1.6.2

Composer 安装命令:

composer require smorken/pin-auth

包简介

Pin Auth helper for Laravel

README 文档

README

Pins are not meant to replace proper authentication. This package exists to provide authentication for specific routes/actions when normal authentication is challenging (a shared app running on a shared computer with SSO authentication).

Example: a shared computer that provides a web app that is authorized via IP. The IP authorization action can be protected behind the pin.

Pins are NOT secure as they have to use a standard hashing algorithm and not algorithms designed for passwords. They are subject to brute force attacks (and rainbow tables if you don't properly set your salt/hmac). You've been warned!

config/auth.php

...
'providers' => [
    ...
    'pin_user_provider' => [
        'driver' => 'pin_users',
    ],
]

config/auth.php

...
'guards' => [
    ...
    'pin_user' => [
        'driver' => 'session',
        'provider' => 'pin_user_provider',
    ],
]

Add to App\Http\Kernel

protected $routeMiddleware = [
    ...
    'pin.auth' => \Smorken\PinAuth\Http\Middleware\PinUserAuthenticate::class,
    ...
]

.env

PINAUTH_HASHER_SALT=randomestringforsalt

License

This software is open-sourced software licensed under the MIT license

The Laravel framework is open-sourced software licensed under the MIT license

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-11