Documentation

PersistentRememberMeHandler extends AbstractRememberMeHandler
in package

FinalYes

Implements remember-me tokens using a {@see TokenProviderInterface}.

This requires storing remember-me tokens in a database. This allows more control over the invalidation of remember-me tokens. See SignatureRememberMeHandler if you don't want to use a database.

Tags
author

Wouter de Jong wouter@wouterj.nl

Table of Contents

Properties

$logger  : mixed
$options  : mixed
$requestStack  : mixed
$tokenProvider  : mixed
$tokenVerifier  : 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.
createRememberMeCookie()  : void
{@inheritdoc}
processRememberMe()  : void
Checks if the RememberMeDetails is a valid cookie to login the given User.
createCookie()  : mixed
Creates the remember-me cookie using the correct configuration.

Properties

Methods

__construct()

public __construct(TokenProviderInterface $tokenProvider, string $secret, UserProviderInterface $userProvider, RequestStack $requestStack, array<string|int, mixed> $options[, LoggerInterface $logger = null ][, TokenVerifierInterface $tokenVerifier = null ]) : mixed
Parameters
$tokenProvider : TokenProviderInterface
$secret : string
$userProvider : UserProviderInterface
$requestStack : RequestStack
$options : array<string|int, mixed>
$logger : LoggerInterface = null
$tokenVerifier : TokenVerifierInterface = null

processRememberMe()

Checks if the RememberMeDetails is a valid cookie to login the given User.

public 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

        
On this page

Search results