AbstractRememberMeHandler
in package
implements
RememberMeHandlerInterface
AbstractYes
Tags
Table of Contents
Interfaces
- RememberMeHandlerInterface
- Handles creating and validating remember-me cookies.
Properties
- $logger : mixed
- $options : mixed
- $requestStack : mixed
- $userProvider : mixed
Methods
- __construct() : mixed
- clearRememberMeCookie() : void
- Clears the remember-me cookie.
- consumeRememberMeCookie() : UserInterface
- Validates the remember-me cookie and returns the associated User.
- createCookie() : mixed
- Creates the remember-me cookie using the correct configuration.
- processRememberMe() : void
- Checks if the RememberMeDetails is a valid cookie to login the given User.
Properties
$logger
protected
mixed
$logger
$options
protected
mixed
$options
$requestStack
protected
mixed
$requestStack
$userProvider
private
mixed
$userProvider
Methods
__construct()
public
__construct(UserProviderInterface $userProvider, RequestStack $requestStack[, array<string|int, mixed> $options = [] ][, LoggerInterface $logger = null ]) : mixed
Parameters
- $userProvider : UserProviderInterface
- $requestStack : RequestStack
- $options : array<string|int, mixed> = []
- $logger : LoggerInterface = null
clearRememberMeCookie()
Clears the remember-me cookie.
public
clearRememberMeCookie() : void
consumeRememberMeCookie()
Validates the remember-me cookie and returns the associated User.
public
consumeRememberMeCookie(RememberMeDetails $rememberMeDetails) : UserInterface
Parameters
- $rememberMeDetails : RememberMeDetails
Return values
UserInterfacecreateCookie()
Creates the remember-me cookie using the correct configuration.
protected
createCookie(RememberMeDetails|null $rememberMeDetails) : mixed
Parameters
- $rememberMeDetails : RememberMeDetails|null
-
The details for the cookie, or null to clear the remember-me cookie
processRememberMe()
Checks if the RememberMeDetails is a valid cookie to login the given User.
protected
abstract processRememberMe(RememberMeDetails $rememberMeDetails, UserInterface $user) : void
This method should also:
- Create a new remember-me cookie to be sent with the response (using createCookie());
- If you store the token somewhere else (e.g. in a database), invalidate the stored token.
Parameters
- $rememberMeDetails : RememberMeDetails
- $user : UserInterface