FormLoginAuthenticator
extends AbstractLoginFormAuthenticator
in package
A base class to make form login authentication easier!
Tags
Table of Contents
Properties
- $failureHandler : mixed
- $httpKernel : mixed
- $httpUtils : mixed
- $options : array<string|int, mixed>
- $successHandler : mixed
- $userProvider : mixed
Methods
- __construct() : mixed
- authenticate() : Passport
- createToken() : TokenInterface
- isInteractive() : bool
- Should return true to make this authenticator perform an interactive login.
- onAuthenticationFailure() : Response
- Override to change what happens after a bad username/password is submitted.
- onAuthenticationSuccess() : Response|null
- setHttpKernel() : void
- start() : Response
- Override to control what happens when the user hits a secure page but isn't logged in yet.
- supports() : bool
- {@inheritdoc}
- getLoginUrl() : string
- Return the URL to the login page.
- getCredentials() : array<string|int, mixed>
Properties
$failureHandler
private
mixed
$failureHandler
$httpKernel
private
mixed
$httpKernel
$httpUtils
private
mixed
$httpUtils
$options
private
array<string|int, mixed>
$options
$successHandler
private
mixed
$successHandler
$userProvider
private
mixed
$userProvider
Methods
__construct()
public
__construct(HttpUtils $httpUtils, UserProviderInterface $userProvider, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array<string|int, mixed> $options) : mixed
Parameters
- $httpUtils : HttpUtils
- $userProvider : UserProviderInterface
- $successHandler : AuthenticationSuccessHandlerInterface
- $failureHandler : AuthenticationFailureHandlerInterface
- $options : array<string|int, mixed>
authenticate()
public
authenticate(Request $request) : Passport
Parameters
- $request : Request
Return values
PassportcreateToken()
public
createToken(Passport $passport, string $firewallName) : TokenInterface
Parameters
- $passport : Passport
- $firewallName : string
Return values
TokenInterfaceisInteractive()
Should return true to make this authenticator perform an interactive login.
public
isInteractive() : bool
Return values
boolonAuthenticationFailure()
Override to change what happens after a bad username/password is submitted.
public
onAuthenticationFailure(Request $request, AuthenticationException $exception) : Response
Parameters
- $request : Request
- $exception : AuthenticationException
Return values
ResponseonAuthenticationSuccess()
public
onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName) : Response|null
Parameters
- $request : Request
- $token : TokenInterface
- $firewallName : string
Return values
Response|nullsetHttpKernel()
public
setHttpKernel(HttpKernelInterface $httpKernel) : void
Parameters
- $httpKernel : HttpKernelInterface
start()
Override to control what happens when the user hits a secure page but isn't logged in yet.
public
start(Request $request[, AuthenticationException $authException = null ]) : Response
Parameters
- $request : Request
- $authException : AuthenticationException = null
Return values
Responsesupports()
{@inheritdoc}
public
supports(Request $request) : bool
Override to change the request conditions that have to be matched in order to handle the login form submit.
This default implementation handles all POST requests to the login path (@see getLoginUrl()).
Parameters
- $request : Request
Return values
boolgetLoginUrl()
Return the URL to the login page.
protected
getLoginUrl(Request $request) : string
Parameters
- $request : Request
Return values
stringgetCredentials()
private
getCredentials(Request $request) : array<string|int, mixed>
Parameters
- $request : Request