Loading src/UnicaenAuthentification/Authentication/Adapter/Cas.php +8 −1 Original line number Diff line number Diff line Loading @@ -70,6 +70,8 @@ class Cas extends AbstractAdapter $this->router = $router; } private string $serviceBaseUrl; /** * @inheritDoc */ Loading Loading @@ -185,7 +187,7 @@ class Cas extends AbstractAdapter } // initialize phpCAS $this->casClient->client($options['version'], $options['hostname'], $options['port'], $options['uri'], true); $this->casClient->client($options['version'], $options['hostname'], $options['port'], $options['uri'], $this->serviceBaseUrl, true); // no SSL validation for the CAS server $this->casClient->setNoCasServerValidation(); Loading Loading @@ -274,4 +276,9 @@ class Cas extends AbstractAdapter ], ]); } public function setServiceBaseUrl(string $serviceBaseUrl): void { $this->serviceBaseUrl = $serviceBaseUrl; } } No newline at end of file src/UnicaenAuthentification/Authentication/Adapter/CasAdapterFactory.php +5 −0 Original line number Diff line number Diff line Loading @@ -63,5 +63,10 @@ class CasAdapterFactory /** @var LdapPeopleMapper $ldapPeopleMapper */ $ldapPeopleMapper = $container->get('ldap_people_mapper'); $adapter->setLdapPeopleMapper($ldapPeopleMapper); /** @var ServerUrl $serverUrl */ $serverUrl = $container->get('ViewHelperManager')->get('ServerUrl'); $adapter->setServiceBaseUrl($serverUrl()); } } No newline at end of file Loading
src/UnicaenAuthentification/Authentication/Adapter/Cas.php +8 −1 Original line number Diff line number Diff line Loading @@ -70,6 +70,8 @@ class Cas extends AbstractAdapter $this->router = $router; } private string $serviceBaseUrl; /** * @inheritDoc */ Loading Loading @@ -185,7 +187,7 @@ class Cas extends AbstractAdapter } // initialize phpCAS $this->casClient->client($options['version'], $options['hostname'], $options['port'], $options['uri'], true); $this->casClient->client($options['version'], $options['hostname'], $options['port'], $options['uri'], $this->serviceBaseUrl, true); // no SSL validation for the CAS server $this->casClient->setNoCasServerValidation(); Loading Loading @@ -274,4 +276,9 @@ class Cas extends AbstractAdapter ], ]); } public function setServiceBaseUrl(string $serviceBaseUrl): void { $this->serviceBaseUrl = $serviceBaseUrl; } } No newline at end of file
src/UnicaenAuthentification/Authentication/Adapter/CasAdapterFactory.php +5 −0 Original line number Diff line number Diff line Loading @@ -63,5 +63,10 @@ class CasAdapterFactory /** @var LdapPeopleMapper $ldapPeopleMapper */ $ldapPeopleMapper = $container->get('ldap_people_mapper'); $adapter->setLdapPeopleMapper($ldapPeopleMapper); /** @var ServerUrl $serverUrl */ $serverUrl = $container->get('ViewHelperManager')->get('ServerUrl'); $adapter->setServiceBaseUrl($serverUrl()); } } No newline at end of file