This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
2013-07-17 16:10:20 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/* Loading simplesamlphp */
|
|
|
|
include_spip('inc/simplesamlphp/lib/_autoload');
|
|
|
|
|
2013-07-18 12:06:55 +02:00
|
|
|
include_spip('inc/headers');
|
2013-07-17 16:10:20 +02:00
|
|
|
include_spip('inc/session');
|
|
|
|
|
2013-07-18 12:06:55 +02:00
|
|
|
include_spip('inc/my_auth');
|
|
|
|
|
2013-07-17 16:10:20 +02:00
|
|
|
function saml_definir_session($session)
|
|
|
|
{
|
|
|
|
// Vérification de la connection à l'idp
|
|
|
|
if (verifier_session())
|
|
|
|
{
|
|
|
|
$simplesaml = new SimpleSAML_Auth_Simple('default-sp');
|
|
|
|
if (!$simplesaml->isAuthenticated())
|
|
|
|
{
|
|
|
|
my_spip_logout();
|
2013-07-18 12:06:55 +02:00
|
|
|
redirige_par_entete('/');
|
2013-07-17 16:10:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return $session;
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|