<?php
/**
* Active Publishing - Creative Common CC BY 4.0
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) Active Publishing (https://activepublishing.fr)
* @license Creative Common CC BY 4.0
* @author Active Publishing <contact@active-publishing.fr>
*/
namespace AdeoSecurityBundle\EventListener;
use AdeoSecurityBundle\Tool\AuthTool;
use Pimcore\Event\Admin\Login\LogoutEvent;
use Pimcore\Tool;
/**
* Class AdminListener
* @package AdeoSecurityBundle\EventListener
*/
class AdminListener
{
/**
* @param LogoutEvent $e
*/
public function onLogout(LogoutEvent $e)
{
$adminSession = Tool\Session::get();
if ($adminSession->has("adeoSecurityLogin")) {
AuthTool::getClientCas();
\phpCAS::logoutWithRedirectService(Tool::getHostUrl() . "/adeo/login");
}
}
}