montée version phpcas et image nineapache
Some checks failed
Cadoles/nineskeletor/pipeline/head There was a failure building this commit

This commit is contained in:
2024-09-28 10:06:59 +02:00
parent 45c01d62db
commit 37bfdb3338
7 changed files with 80 additions and 23 deletions

View File

@ -81,9 +81,10 @@ class SecurityController extends AbstractController
$appMasteridentity = $this->getParameter('appMasteridentity');
// Init Client CAS
$alias = $this->getParameter('appAlias');
\phpCAS::setDebug($this->appKernel->getProjectDir().'/var/log/cas.log');
\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('casHost'), intval($this->getParameter('casPort')), is_null($this->getParameter('casPath')) ? '' : $this->getParameter('casPath'), false);
$url=$this->getHost($request);
$url=str_replace("http://",$this->getParameter("protocole")."://",$url);
$url=str_replace("https://",$this->getParameter("protocole")."://",$url);
\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('casHost'), intval($this->getParameter('casPort')), is_null($this->getParameter('casPath')) ? '' : $this->getParameter('casPath'), $url, false);
\phpCAS::setNoCasServerValidation();
// Authentification
@ -352,13 +353,16 @@ class SecurityController extends AbstractController
$request->getSession()->invalidate();
// Init Client CAS
$alias = $this->getParameter('appAlias');
\phpCAS::setDebug($this->appKernel->getProjectDir().'/var/log/cas.log');
\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('casHost'), intval($this->getParameter('casPort')), is_null($this->getParameter('casPath')) ? '' : $this->getParameter('casPath'), false);
$url=$this->getHost($request);
$url=str_replace("http://",$this->getParameter("protocole")."://",$url);
$url=str_replace("https://",$this->getParameter("protocole")."://",$url);
\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('casHost'), intval($this->getParameter('casPort')), is_null($this->getParameter('casPath')) ? '' : $this->getParameter('casPath'), $url, false);
\phpCAS::setNoCasServerValidation();
// Logout
$url = $this->generateUrl('app_home', [], UrlGeneratorInterface::ABSOLUTE_URL);
$url=$this->generateUrl('app_home', array(), UrlGeneratorInterface::ABSOLUTE_URL);
$url=str_replace("http://",$this->getParameter("protocole")."://",$url);
$url=str_replace("https://",$this->getParameter("protocole")."://",$url);
\phpCAS::logout(['service' => $url]);
return true;