mardi 4 octobre 2016

$this->clearLoginAttempts($request); is not working preperly?

I have Route like this.

Route::post('login',           
    array (
        'uses'          => 'Auth\LoginController@login',
        'as'            => 'postlogin',
        'middleware'    => ['throttle:3,1']
    )
);

Below mentioned method can be found in this file:

vendor\laravel\framework\src\Illuminate\Foundation\Auth\AuthenticatesUsers.php

protected function sendLoginResponse(Request $request)
{
    $request->session()->regenerate();

    $this->clearLoginAttempts($request);

    return $this->authenticated($request, $this->guard()->user())
            ?: redirect()->intended($this->redirectPath());
}

What am I doing?

I am authenticated Successfully and then pressed Logout button. I did the same thing 3 times. Each time I am authenticated successfully and then pressing logout button. On 4th attempt, I am locked for 1 minute.

What's the problem?

On successful login, this code $this->clearLoginAttempts($request); executes and clears the previous login attempts. Still I am locked. Why? Is it an issue in Laravel 5.3?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire