phpcas
This commit is contained in:
parent
b6d4e9dc83
commit
380b353e30
1 changed files with 7 additions and 6 deletions
|
@ -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 !"]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue