class FirewallAwareRememberMeHandler implementsRememberMeHandlerInterface

Decorates {see RememberMeHandlerInterface} for the current firewall.

Traits

FirewallAwareTrait

Constants

FIREWALL_OPTION

Methods

__construct(FirewallMap$firewallMap,ContainerInterface$rememberMeHandlerLocator,RequestStack$requestStack)

No description

void
createRememberMeCookie(UserInterface$user)

Creates a remember-me cookie.

consumeRememberMeCookie(RememberMeDetails$rememberMeDetails)

Validates the remember-me cookie and returns the associated User.

void
clearRememberMeCookie()

Clears the remember-me cookie.

Details

__construct(FirewallMap$firewallMap,ContainerInterface$rememberMeHandlerLocator,RequestStack$requestStack)

Parameters

FirewallMap $firewallMap
ContainerInterface $rememberMeHandlerLocator
RequestStack $requestStack

void createRememberMeCookie(UserInterface$user)

Creates a remember-me cookie.

The actual cookie should be set as an attribute on the main request, which is transformed into a response cookie by {see ResponseListener}.

Parameters

UserInterface $user

Return Value

void

UserInterface consumeRememberMeCookie(RememberMeDetails$rememberMeDetails)

Validates the remember-me cookie and returns the associated User.

Every cookie should only be used once. This means that this method should also: - Create a new remember-me cookie to be sent with the response (using the {see ResponseListener::COOKIE_ATTR_NAME} request attribute); - If you store the token somewhere else (e.g. in a database), invalidate the stored token.

Parameters

RememberMeDetails $rememberMeDetails

Return Value

UserInterface

Exceptions

AuthenticationException

void clearRememberMeCookie()

Clears the remember-me cookie.

This should set a cookie with a null value on the request attribute.

Return Value

void