AuthenticatesUsers
Table of Contents
- login() : RedirectResponse|Response|JsonResponse
- Handle a login request to the application.
- logout() : Response
- Log the user out of the application.
- showLoginForm() : Response
- Show the application's login form.
- username() : string
- Get the login username to be used by the controller.
- attemptLogin() : bool
- Attempt to log the user into the application.
- authenticated() : mixed
- The user has been authenticated.
- credentials() : array<string|int, mixed>
- Get the needed authorization credentials from the request.
- guard() : StatefulGuard
- Get the guard to be used during authentication.
- sendFailedLoginResponse() : Response
- Get the failed login response instance.
- sendLoginResponse() : Response
- Send the response after the user was authenticated.
- validateLogin() : void
- Validate the user login request.
Methods
login()
Handle a login request to the application.
public
login(Request $request) : RedirectResponse|Response|JsonResponse
Parameters
- $request : Request
Return values
RedirectResponse|Response|JsonResponse —logout()
Log the user out of the application.
public
logout(Request $request) : Response
Parameters
- $request : Request
Return values
Response —showLoginForm()
Show the application's login form.
public
showLoginForm() : Response
Return values
Response —username()
Get the login username to be used by the controller.
public
username() : string
Return values
string —attemptLogin()
Attempt to log the user into the application.
protected
attemptLogin(Request $request) : bool
Parameters
- $request : Request
Return values
bool —authenticated()
The user has been authenticated.
protected
authenticated(Request $request, mixed $user) : mixed
Parameters
- $request : Request
- $user : mixed
Return values
mixed —credentials()
Get the needed authorization credentials from the request.
protected
credentials(Request $request) : array<string|int, mixed>
Parameters
- $request : Request
Return values
array<string|int, mixed> —guard()
Get the guard to be used during authentication.
protected
guard() : StatefulGuard
Return values
StatefulGuard —sendFailedLoginResponse()
Get the failed login response instance.
protected
sendFailedLoginResponse(Request $request) : Response
Parameters
- $request : Request
Tags
Return values
Response —sendLoginResponse()
Send the response after the user was authenticated.
protected
sendLoginResponse(Request $request) : Response
Parameters
- $request : Request
Return values
Response —validateLogin()
Validate the user login request.
protected
validateLogin(Request $request) : void
Parameters
- $request : Request