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){
|
||||
case 'auth':
|
||||
try{
|
||||
/*try{
|
||||
$_SESSION["utilisateur_authentifie"] = true;
|
||||
session_regenerate_id(true);
|
||||
$_SESSION["heure_debut"] = time();
|
||||
echo(json_encode(["status"=>"1","msg"=>"Authentification réussie."]));
|
||||
}catch(Exception $e){
|
||||
echo( json_encode(["status"=> "0","msg"=> $e->getMessage() ]) );
|
||||
}
|
||||
}*/
|
||||
echo( json_encode(["status"=> "0","msg"=> "Authentification par api pas encore active."]));
|
||||
|
||||
break;
|
||||
|
||||
case 'unauth':
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
border-top: 0px;
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
|
||||
}
|
||||
|
||||
.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>
|
||||
|
||||
<button class="button color-red-tr" id="btn-connection">connection</button>
|
||||
<button class="button color-red-tr" id="btn-deconnection">déconnection</button>
|
||||
|
||||
<a href="session_verif.php" class="button color-red-tr" id="btn-connection">connection</a>
|
||||
<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>
|
||||
|
|
|
@ -32,8 +32,10 @@ if (isset($_REQUEST['logout'])) {
|
|||
phpCAS::logout();
|
||||
}*/
|
||||
|
||||
//$_SESSION["utilisateur_authentifie"] = true;
|
||||
|
||||
function verifier_session(){
|
||||
|
||||
//return json_encode(["status"=>1,"msg"=>"Bonjour ".phpCAS::getUser()." !"]);
|
||||
return json_encode(["status"=>1,"msg"=>"Bonjour !"]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue