Documentation

RememberMeHandlerInterface

Handles creating and validating remember-me cookies.

If you want to add a custom implementation, you want to extend from AbstractRememberMeHandler instead.

Tags
author

Wouter de Jong wouter@wouterj.nl

Table of Contents

Methods

clearRememberMeCookie()  : void
Clears the remember-me cookie.
consumeRememberMeCookie()  : UserInterface
Validates the remember-me cookie and returns the associated User.
createRememberMeCookie()  : void
Creates a remember-me cookie.

Methods

clearRememberMeCookie()

Clears the remember-me cookie.

public clearRememberMeCookie() : void

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

consumeRememberMeCookie()

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

public consumeRememberMeCookie(RememberMeDetails $rememberMeDetails) : UserInterface

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 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
Tags
throws
AuthenticationException
Return values
UserInterface

        
On this page

Search results