Commit fa40379e authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Authentification Shib : pour tester si un utilisateur est authentifié ou non...

Authentification Shib : pour tester si un utilisateur est authentifié ou non (via ), on regarde 'Shib-Session-ID' et 'HTTP_SHIB_SESSION_ID' en plus de 'REMOTE_USER'.
parent e1202132
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -100,7 +100,10 @@ EOS;
     */
    private function isAuthenticated()
    {
        return (bool) $this->getServerArrayVariable('REMOTE_USER');
        return
            $this->getServerArrayVariable('REMOTE_USER') ||
            $this->getServerArrayVariable('Shib-Session-ID') ||
            $this->getServerArrayVariable('HTTP_SHIB_SESSION_ID');
    }

    /**
@@ -363,7 +366,7 @@ EOS;
     */
    public function simulateAuthenticatedUser(ShibUser $shibUser, $keyForId = 'supannEmpId')
    {
        // 'REMOTE_USER' est utilisé pour savoir si un utilisateur est authentifié ou non
        // 'REMOTE_USER' (notamment) est utilisé pour savoir si un utilisateur est authentifié ou non
        $this->setServerArrayVariable('REMOTE_USER', $shibUser->getEppn());

//        // on s'assure que tous les attributs obligatoires ont une valeur