trait AuthenticatesUsers

Traits

Methods

string
redirectPath()

Get the post register / login redirect path.

bool
hasTooManyLoginAttempts(Request $request)

Determine if the user has too many failed login attempts.

void
incrementLoginAttempts(Request $request)

Increment the login attempts for the user.

sendLockoutResponse(Request $request)

Redirect the user after determining they are locked out.

void
clearLoginAttempts(Request $request)

Clear the login locks for the given user credentials.

void
fireLockoutEvent(Request $request)

Fire an event when a lockout occurs.

string
throttleKey(Request $request)

Get the throttle key for the given request.

limiter()

Get the rate limiter instance.

int
maxAttempts()

Get the maximum number of attempts to allow.

int
decayMinutes()

Get the number of minutes to throttle for.

showLoginForm()

Show the application's login form.

login(Request $request)

Handle a login request to the application.

void
validateLogin(Request $request)

Validate the user login request.

bool
attemptLogin(Request $request)

Attempt to log the user into the application.

array
credentials(Request $request)

Get the needed authorization credentials from the request.

sendLoginResponse(Request $request)

Send the response after the user was authenticated.

mixed
authenticated(Request $request, mixed $user)

The user has been authenticated.

sendFailedLoginResponse(Request $request)

Get the failed login response instance.

string
username()

Get the login username to be used by the controller.

logout(Request $request)

Log the user out of the application.

guard()

Get the guard to be used during authentication.

Details

in RedirectsUsers at line 12
string redirectPath()

Get the post register / login redirect path.

Return Value

string

in ThrottlesLogins at line 19
protected bool hasTooManyLoginAttempts(Request $request)

Determine if the user has too many failed login attempts.

Parameters

Request $request

Return Value

bool

in ThrottlesLogins at line 32
protected void incrementLoginAttempts(Request $request)

Increment the login attempts for the user.

Parameters

Request $request

Return Value

void

in ThrottlesLogins at line 43
protected RedirectResponse sendLockoutResponse(Request $request)

Redirect the user after determining they are locked out.

Parameters

Request $request

Return Value

RedirectResponse

in ThrottlesLogins at line 68
protected void clearLoginAttempts(Request $request)

Clear the login locks for the given user credentials.

Parameters

Request $request

Return Value

void

in ThrottlesLogins at line 79
protected void fireLockoutEvent(Request $request)

Fire an event when a lockout occurs.

Parameters

Request $request

Return Value

void

in ThrottlesLogins at line 90
protected string throttleKey(Request $request)

Get the throttle key for the given request.

Parameters

Request $request

Return Value

string

in ThrottlesLogins at line 100
protected RateLimiter limiter()

Get the rate limiter instance.

Return Value

RateLimiter

in ThrottlesLogins at line 110
int maxAttempts()

Get the maximum number of attempts to allow.

Return Value

int

in ThrottlesLogins at line 120
int decayMinutes()

Get the number of minutes to throttle for.

Return Value

int

at line 17
Response showLoginForm()

Show the application's login form.

Return Value

Response

at line 28
RedirectResponse|Response login(Request $request)

Handle a login request to the application.

Parameters

Request $request

Return Value

RedirectResponse|Response

at line 59
protected void validateLogin(Request $request)

Validate the user login request.

Parameters

Request $request

Return Value

void

at line 73
protected bool attemptLogin(Request $request)

Attempt to log the user into the application.

Parameters

Request $request

Return Value

bool

at line 86
protected array credentials(Request $request)

Get the needed authorization credentials from the request.

Parameters

Request $request

Return Value

array

at line 97
protected Response sendLoginResponse(Request $request)

Send the response after the user was authenticated.

Parameters

Request $request

Return Value

Response

at line 114
protected mixed authenticated(Request $request, mixed $user)

The user has been authenticated.

Parameters

Request $request
mixed $user

Return Value

mixed

at line 125
protected RedirectResponse sendFailedLoginResponse(Request $request)

Get the failed login response instance.

Parameters

Request $request

Return Value

RedirectResponse

at line 143
string username()

Get the login username to be used by the controller.

Return Value

string

at line 154
Response logout(Request $request)

Log the user out of the application.

Parameters

Request $request

Return Value

Response

at line 168
protected StatefulGuard guard()

Get the guard to be used during authentication.

Return Value

StatefulGuard