Properties

$maxAttempts

$maxAttempts : integer

Type

integer — Maximum amount of login attempts

$decayMinutes

$decayMinutes : integer

Type

integer — Time in minutes to block further login attempts for, once the limit is reached

$throttleKey

$throttleKey : string

Type

string — Throttle key template. Variables `{login}` and `{ip}` will be replaced with appropriate data.

$httpRequest

$httpRequest : \Illuminate\Http\Request

HTTP request

Type

\Illuminate\Http\Request

$guard

$guard : \Illuminate\Contracts\Auth\Guard

Type

\Illuminate\Contracts\Auth\Guard

Methods

setHttpRequest()

setHttpRequest(\Illuminate\Http\Request  $httpRequest) 

Parameters

\Illuminate\Http\Request $httpRequest

__construct()

__construct(\Illuminate\Contracts\Auth\Guard  $guard) 

LoginRequest constructor.

Parameters

\Illuminate\Contracts\Auth\Guard $guard

login()

login(string  $login, string  $password, boolean  $remember, \Illuminate\Http\Request|null  $request = null) : mixed

Try to log in and return an appropriate response

Parameters

string $login

Username or email

string $password
boolean $remember
\Illuminate\Http\Request|null $request

Throws

\Illuminate\Validation\ValidationException

Returns

mixed

createFailedLoginMessage()

createFailedLoginMessage(\App\User|null  $user) : string

Return an error message about why the login failed.

Parameters

\App\User|null $user

Returns

string

limiter()

limiter() : \Illuminate\Cache\RateLimiter

Get the rate limiter instance

Returns

\Illuminate\Cache\RateLimiter

provider()

provider() : \Illuminate\Contracts\Auth\UserProvider

Get the user provider instance

Returns

\Illuminate\Contracts\Auth\UserProvider

guard()

guard() : \Illuminate\Contracts\Auth\StatefulGuard

Get the guard to be used during authentication.

Returns

\Illuminate\Contracts\Auth\StatefulGuard

sendLockoutResponse()

sendLockoutResponse(integer  $seconds) : mixed

The return value of login() for when the user has been forbidden from attempting to log in.

Parameters

integer $seconds

Time in seconds for how long the user has to wait before they can log in again.

Throws

\Illuminate\Validation\ValidationException

Returns

mixed

sendLoginResponse()

sendLoginResponse() 

sendFailedLoginResponse()

sendFailedLoginResponse(string  $failureMessage) : mixed

The return value of login() for when the login was unsuccessful.

Parameters

string $failureMessage

Message provided by createFailedLoginMessage()

Throws

\Illuminate\Validation\ValidationException

Returns

mixed

shouldResolve()

shouldResolve() : true|string

Decides whether the request will be resolved.

If the request should not run, returns the error message. Otherwise returns true.

Returns

true|string

rules()

rules(\Illuminate\Support\Collection  $parameters, \Illuminate\Validation\Validator|null  $validator = null) : array

Returns validation rules for the request parameters

Parameters

\Illuminate\Support\Collection $parameters
\Illuminate\Validation\Validator|null $validator

Returns

array

_rules()

_rules(\Illuminate\Support\Collection  $parameters, \Illuminate\Validation\Validator  $validator = null) : array

Returns validation rules for the request parameters. Should be used by abstract classes and should always concatenate result with parent implementation

Parameters

\Illuminate\Support\Collection $parameters
\Illuminate\Validation\Validator $validator

Returns

array

jsonParameters()

jsonParameters() : array<mixed,string>

Returns an array of parameters that are JSON and should be converted to an array

Returns

array<mixed,string>

doResolve()

doResolve(  $name, \Illuminate\Support\Collection  $parameters) : \App\Api\Response\Response|mixed

This function is called only when all validation passed.

Should return a Response.

Parameters

$name
\Illuminate\Support\Collection $parameters

Throws

\Illuminate\Validation\ValidationException

Returns

\App\Api\Response\Response|mixed

authorizationError()

authorizationError() 

Throws

\Illuminate\Auth\Access\AuthorizationException