préparation de la connection phpcas
This commit is contained in:
parent
6e9b617eba
commit
ea77a8f585
4 changed files with 11 additions and 5 deletions
6
api.php
6
api.php
|
@ -38,14 +38,16 @@
|
||||||
|
|
||||||
switch($endpoint){
|
switch($endpoint){
|
||||||
case 'auth':
|
case 'auth':
|
||||||
try{
|
/*try{
|
||||||
$_SESSION["utilisateur_authentifie"] = true;
|
$_SESSION["utilisateur_authentifie"] = true;
|
||||||
session_regenerate_id(true);
|
session_regenerate_id(true);
|
||||||
$_SESSION["heure_debut"] = time();
|
$_SESSION["heure_debut"] = time();
|
||||||
echo(json_encode(["status"=>"1","msg"=>"Authentification réussie."]));
|
echo(json_encode(["status"=>"1","msg"=>"Authentification réussie."]));
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
echo( json_encode(["status"=> "0","msg"=> $e->getMessage() ]) );
|
echo( json_encode(["status"=> "0","msg"=> $e->getMessage() ]) );
|
||||||
}
|
}*/
|
||||||
|
echo( json_encode(["status"=> "0","msg"=> "Authentification par api pas encore active."]));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'unauth':
|
case 'unauth':
|
||||||
|
|
|
@ -89,6 +89,7 @@
|
||||||
border-top: 0px;
|
border-top: 0px;
|
||||||
border-left: 0px;
|
border-left: 0px;
|
||||||
border-right: 0px;
|
border-right: 0px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-red-tr{
|
.color-red-tr{
|
||||||
|
|
|
@ -24,9 +24,10 @@
|
||||||
|
|
||||||
<h4>Comme vous pouvez le constater, on cherche quelqu'un pour le design (html + css) du site :D club.info@amicale-insat.fr</h4>
|
<h4>Comme vous pouvez le constater, on cherche quelqu'un pour le design (html + css) du site :D club.info@amicale-insat.fr</h4>
|
||||||
|
|
||||||
<button class="button color-red-tr" id="btn-connection">connection</button>
|
<a href="session_verif.php" class="button color-red-tr" id="btn-connection">connection</a>
|
||||||
<button class="button color-red-tr" id="btn-deconnection">déconnection</button>
|
<a href="session_verif.php?logout=true" class="button color-red-tr" id="btn-deconnection">déconnection</a>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
<div id="user_status">
|
<div id="user_status">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -32,8 +32,10 @@ if (isset($_REQUEST['logout'])) {
|
||||||
phpCAS::logout();
|
phpCAS::logout();
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
//$_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