This commit is contained in:
thaaoblues 2024-04-11 22:02:45 +02:00
parent b6d4e9dc83
commit 380b353e30

View file

@ -1,6 +1,6 @@
<?php <?php
session_start(); session_start();
/*
// Load the CAS lib // Load the CAS lib
require_once("phpCAS-1.6.1/CAS.php"); require_once("phpCAS-1.6.1/CAS.php");
@ -10,7 +10,7 @@ phpCAS::setLogger();
phpCAS::setVerbose(true); phpCAS::setVerbose(true);
// Initialize phpCAS // Initialize phpCAS
phpCAS::client(CAS_VERSION_2_0, "cas.insa-toulouse.fr", 443, 'cas',"https://arch.etud.insa-toulouse.fr"); phpCAS::client(CAS_VERSION_2_0, "cas.insa-toulouse.fr", 443, 'cas',"https://annales.insat.fr");
// For production use set the CA certificate that is the issuer of the cert // For production use set the CA certificate that is the issuer of the cert
// on the CAS server and uncomment the line below // on the CAS server and uncomment the line below
@ -30,14 +30,15 @@ phpCAS::forceAuthentication();
// logout if desired // logout if desired
if (isset($_REQUEST['logout'])) { if (isset($_REQUEST['logout'])) {
phpCAS::logout(); phpCAS::logout();
}*/ $_SESSION["utilisateur_authentifie"] = false;
}
//$_SESSION["utilisateur_authentifie"] = true; $_SESSION["utilisateur_authentifie"] = true;
function verifier_session(){ function verifier_session(){
//return json_encode(["status"=>1,"msg"=>"Bonjour ".phpCAS::getUser()." !"]); return json_encode(["status"=>1,"msg"=>"Bonjour ".phpCAS::getUser()." !"]);
return json_encode(["status"=>1,"msg"=>"Bonjour !"]); //return json_encode(["status"=>1,"msg"=>"Bonjour !"]);
} }