JsonLoginAuthenticator
in package
implements
InteractiveAuthenticatorInterface
Provides a stateless implementation of an authentication via a JSON document composed of a username and a password.
Tags
Table of Contents
Interfaces
- InteractiveAuthenticatorInterface
- This is an extension of the authenticator interface that must be used by interactive authenticators.
Properties
- $failureHandler : mixed
- $httpUtils : mixed
- $options : array<string|int, mixed>
- $propertyAccessor : mixed
- $successHandler : mixed
- $translator : 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|null
- onAuthenticationSuccess() : Response|null
- setTranslator() : mixed
- supports() : bool|null
- getCredentials() : mixed
Properties
$failureHandler
private
mixed
$failureHandler
$httpUtils
private
mixed
$httpUtils
$options
private
array<string|int, mixed>
$options
$propertyAccessor
private
mixed
$propertyAccessor
$successHandler
private
mixed
$successHandler
$translator
private
mixed
$translator
= null
$userProvider
private
mixed
$userProvider
Methods
__construct()
public
__construct(HttpUtils $httpUtils, UserProviderInterface $userProvider[, AuthenticationSuccessHandlerInterface $successHandler = null ][, AuthenticationFailureHandlerInterface $failureHandler = null ][, array<string|int, mixed> $options = [] ][, PropertyAccessorInterface $propertyAccessor = null ]) : mixed
Parameters
- $httpUtils : HttpUtils
- $userProvider : UserProviderInterface
- $successHandler : AuthenticationSuccessHandlerInterface = null
- $failureHandler : AuthenticationFailureHandlerInterface = null
- $options : array<string|int, mixed> = []
- $propertyAccessor : PropertyAccessorInterface = null
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()
public
onAuthenticationFailure(Request $request, AuthenticationException $exception) : Response|null
Parameters
- $request : Request
- $exception : AuthenticationException
Return values
Response|nullonAuthenticationSuccess()
public
onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName) : Response|null
Parameters
- $request : Request
- $token : TokenInterface
- $firewallName : string
Return values
Response|nullsetTranslator()
public
setTranslator(TranslatorInterface $translator) : mixed
Parameters
- $translator : TranslatorInterface
supports()
public
supports(Request $request) : bool|null
Parameters
- $request : Request
Return values
bool|nullgetCredentials()
private
getCredentials(Request $request) : mixed
Parameters
- $request : Request