class PersistentTokenBasedRememberMeServices extends AbstractRememberMeServices

Concrete implementation of the RememberMeServicesInterface which needs an implementation of TokenProviderInterface for providing remember-me capabilities.

Constants

COOKIE_DELIMITER

Methods

__construct(array $userProviders, string $secret, string $providerKey, array $options = array(), LoggerInterface $logger = null)

Constructor.

string
getRememberMeParameter()

Returns the parameter that is used for checking whether remember-me services have been requested.

string
getSecret()

No description

autoLogin(Request $request)

Implementation of RememberMeServicesInterface. Detects whether a remember-me cookie was set, decodes it, and hands it to subclasses for further processing.

logout(Request $request, Response $response, TokenInterface $token)

Implementation for LogoutHandlerInterface. Deletes the cookie.

loginFail(Request $request)

Implementation for RememberMeServicesInterface. Deletes the cookie when an attempted authentication fails.

loginSuccess(Request $request, Response $response, TokenInterface $token)

Implementation for RememberMeServicesInterface. This is called when an authentication is successful.

setTokenProvider(TokenProviderInterface $tokenProvider)

Sets the token provider.

Details

in AbstractRememberMeServices at line line 57
__construct(array $userProviders, string $secret, string $providerKey, array $options = array(), LoggerInterface $logger = null)

Constructor.

Parameters

array $userProviders
string $secret
string $providerKey
array $options
LoggerInterface $logger

Exceptions

InvalidArgumentException

in AbstractRememberMeServices at line line 82
string getRememberMeParameter()

Returns the parameter that is used for checking whether remember-me services have been requested.

Return Value

string

in AbstractRememberMeServices at line line 90
string getSecret()

Return Value

string

in AbstractRememberMeServices at line line 106
final TokenInterface autoLogin(Request $request)

Implementation of RememberMeServicesInterface. Detects whether a remember-me cookie was set, decodes it, and hands it to subclasses for further processing.

Parameters

Request $request

Return Value

TokenInterface

Exceptions

CookieTheftException
RuntimeException

in AbstractRememberMeServices at line line 158
logout(Request $request, Response $response, TokenInterface $token)

Implementation for LogoutHandlerInterface. Deletes the cookie.

Parameters

Request $request
Response $response
TokenInterface $token

in AbstractRememberMeServices at line line 169
final loginFail(Request $request)

Implementation for RememberMeServicesInterface. Deletes the cookie when an attempted authentication fails.

Parameters

Request $request

in AbstractRememberMeServices at line line 183
final loginSuccess(Request $request, Response $response, TokenInterface $token)

Implementation for RememberMeServicesInterface. This is called when an authentication is successful.

Parameters

Request $request
Response $response
TokenInterface $token

at line line 39
setTokenProvider(TokenProviderInterface $tokenProvider)

Sets the token provider.

Parameters

TokenProviderInterface $tokenProvider