Skip to content
Snippets Groups Projects
Commit 36ec1fc2 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Shib: vérification que l'eppn usurpé contient bien un domaine

parent 878a1d3d
No related branches found
No related tags found
No related merge requests found
......@@ -142,6 +142,8 @@ EOS;
try {
Assertion::keyIsset($simulate, 'eppn',
"Clé 'eppn' introuvable ou sans valeur dans l'option 'unicaen-auth.shibboleth.simulate'");
Assertion::contains($simulate['eppn'], '@',
"L'eppn '" . $simulate['eppn'] . "' n'est pas de la forme 'id@domaine' attendue (ex: 'tartempion@unicaen.fr')");
Assertion::eq(count(array_intersect($keys = ['supannEmpId', 'supannEtuId'], array_keys($simulate))), 1,
"L'une ou l'autre de ces clés doit être présente dans l'option 'unicaen-auth.shibboleth.simulate': " .
implode(', ', $keys));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment