承接 sanchescom/lumen-login-throttling 相关项目开发

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

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

sanchescom/lumen-login-throttling

Composer 安装命令:

composer require sanchescom/lumen-login-throttling

包简介

Lumen login throttling.

README 文档

README

Laravel Login Throttling for Lumen framework

Installing

Require this package, with Composer, in the root directory of your project.

composer require sanchescom/lumen-login-throttling

Usage

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Sanchescom\Foundation\Auth\AuthenticatesUsers;
use Laravel\Lumen\Routing\Controller;

class AuthController extends Controller
{
    use AuthenticatesUsers;

    /** @var int */
    protected $maxAttempts = 3;

    /** @var int */
    protected $decayMinutes = 5;
    
    /**
     * Handle a login request to the application.
     *
     * @param  \Illuminate\Http\Request $request
     *
     * @throws \Illuminate\Validation\ValidationException
     *
     * @return mixed
     */
    public function login(Request $request)
    {
        $this->validateLogin($request);

        if ($this->hasTooManyLoginAttempts($request)) {
            $this->fireLockoutEvent($request);

            return $this->sendLockoutResponse($request);
        }

        if ($this->attemptLogin($request)) {
            return $this->sendLoginResponse($request);
        }
        
        $this->incrementLoginAttempts($request);

        return $this->sendFailedLoginResponse($request);
    }
}

Laravel Login Throttling documentation

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固