Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Leave clearing the session to SessionAuthenticationStrategy

Pre-release
Pre-release
Compare
Choose a tag to compare
@metaclass-nl metaclass-nl released this 19 Sep 10:44

Clearing the session is out of scope for the AuthenticationGuardBundle. Somenone who wants to clear the session should implement a SessionAuthenticationStrategy of his own, inject the TokenSotorageInterface from the service configuration and in the onAuthentication method clear the session when both $oldToken and $newToken are instanceof UsernamePasswordToken and usernames of both tokens are different.