AbstractLoginFormAuthenticator
extends AbstractAuthenticator
in package
implements
AuthenticationEntryPointInterface, InteractiveAuthenticatorInterface
AbstractYes
A base class to make form login authentication easier!
Tags
Table of Contents
Interfaces
- AuthenticationEntryPointInterface
- Implement this interface for any classes that will be called to "start" the authentication process (see method for more details).
- InteractiveAuthenticatorInterface
- This is an extension of the authenticator interface that must be used by interactive authenticators.
Methods
- createToken() : TokenInterface
- Shortcut to create a PostAuthenticationToken for you, if you don't really care about which authenticated token you're using.
- 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.
- 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.
Methods
createToken()
Shortcut to create a PostAuthenticationToken for you, if you don't really care about which authenticated token you're using.
public
createToken(Passport $passport, string $firewallName) : TokenInterface
Parameters
- $passport : Passport
-
The passport returned from authenticate()
- $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
Responsestart()
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
abstract getLoginUrl(Request $request) : string
Parameters
- $request : Request