Commit 3c692856 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

6.4 (09/01/2025)

----------------

- Passage à phpCAS 1.6
parent 5f33ffae
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
# CHANGELOG

6.4 (09/01/2025)
----------------

- Passage à phpCAS 1.6


6.3.2 (09/01/2025)
------------------

+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
      "unicaen/app": ">=6.2",
      "unicaen/utilisateur": "^6.3|^7.0",
      "unicaen/bjy-authorize": "^6.0",
      "apereo/phpcas": "1.5.*",
      "apereo/phpcas": "1.6.*",
      "ramsey/uuid": "^3.7"
    },
    "require-dev": {
+17 −1
Original line number Diff line number Diff line
@@ -62,6 +62,9 @@ class Cas extends AbstractAdapter
     */
    private $router;

    private string $serviceBaseUrl;


    /**
     * @param RouteInterface $router
     */
@@ -176,7 +179,12 @@ class Cas extends AbstractAdapter
        }

        // initialize phpCAS
        if (PHPCAS_VERSION >= '1.6'){
            $this->casClient->client($options['version'], $options['hostname'], $options['port'], $options['uri'], $this->serviceBaseUrl,true);
        }else{
            $this->casClient->client($options['version'], $options['hostname'], $options['port'], $options['uri'], true);
        }

        // no SSL validation for the CAS server
        $this->casClient->setNoCasServerValidation();

@@ -265,4 +273,12 @@ class Cas extends AbstractAdapter
            ],
        ]);
    }



    public function setServiceBaseUrl(string $serviceBaseUrl): void
    {
        $this->serviceBaseUrl = $serviceBaseUrl;
    }

}
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ namespace UnicaenAuthentification\Authentication\Adapter;

use Interop\Container\ContainerInterface;
use Laminas\Authentication\Storage\Session;
use Laminas\View\Helper\ServerUrl;
use UnicaenApp\Mapper\Ldap\People as LdapPeopleMapper;
use UnicaenAuthentification\Options\ModuleOptions;
use UnicaenAuthentification\Service\User;
@@ -61,5 +62,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