"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core-bundle/src/Security/Logout/LogoutHandler.php" between
contao-4.11.3.tar.gz and contao-4.11.4.tar.gz

About: Contao (fka TYPOlight) is a content management system (CMS). Latest release.

LogoutHandler.php  (contao-4.11.3):LogoutHandler.php  (contao-4.11.4)
skipping to change at line 52 skipping to change at line 52
* @internal Do not inherit from this class; decorate the "contao.security.l ogout_handler" service instead * @internal Do not inherit from this class; decorate the "contao.security.l ogout_handler" service instead
*/ */
public function __construct(ContaoFramework $framework, LoggerInterface $log ger = null) public function __construct(ContaoFramework $framework, LoggerInterface $log ger = null)
{ {
$this->framework = $framework; $this->framework = $framework;
$this->logger = $logger; $this->logger = $logger;
} }
public function logout(Request $request, ?Response $response, TokenInterface $token): void public function logout(Request $request, ?Response $response, TokenInterface $token): void
{ {
if ($request->hasSession() && method_exists($token, 'getProviderKey')) { if ($request->hasSession()) {
$this->removeTargetPath($request->getSession(), $token->getProviderK // Backwards compatibility with symfony/security <5.2
ey()); if (method_exists($token, 'getFirewallName')) {
$this->removeTargetPath($request->getSession(), $token->getFirew
allName());
} elseif (method_exists($token, 'getProviderKey')) {
$this->removeTargetPath($request->getSession(), $token->getProvi
derKey());
}
} }
$user = $token->getUser(); $user = $token->getUser();
if (!$user instanceof User || $token instanceof TwoFactorTokenInterface) { if (!$user instanceof User || $token instanceof TwoFactorTokenInterface) {
return; return;
} }
if (null !== $this->logger) { if (null !== $this->logger) {
$this->logger->info( $this->logger->info(
 End of changes. 1 change blocks. 
3 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)