W3cubDocs

/Symfony 4.1

SessionAuthenticationStrategy

class SessionAuthenticationStrategy implements SessionAuthenticationStrategyInterface

The default session strategy implementation.

Supports the following strategies: NONE: the session is not changed MIGRATE: the session id is updated, attributes are kept INVALIDATE: the session id is updated, attributes are lost

Constants

NONE
MIGRATE
INVALIDATE

Methods

__construct(string $strategy)
onAuthentication(Request $request, TokenInterface $token)

This performs any necessary changes to the session.

Details

__construct(string $strategy)

Parameters

string $strategy

onAuthentication(Request $request, TokenInterface $token)

This performs any necessary changes to the session.

This method should be called before the TokenStorage is populated with a Token. It should be used by authentication listeners when a session is used.

Parameters

Request $request
TokenInterface $token