From 27942b8b829517fd53bc87e08a54b59220efb496 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 8 Dec 2017 02:50:18 +0100 Subject: [PATCH] fix: $_SESSION['name'] is now ok with API calls (tokens, etc) --- build/api/core/AuthSystemDefault.php | 4 +++- build/api/core/Response.php | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build/api/core/AuthSystemDefault.php b/build/api/core/AuthSystemDefault.php index ff960e7..76b404e 100755 --- a/build/api/core/AuthSystemDefault.php +++ b/build/api/core/AuthSystemDefault.php @@ -39,8 +39,10 @@ $AUTH = ''; /* (1) Si Auth dans HEADER, on le récupère */ - if( isset($_SERVER['PHP_AUTH_DIGEST']) && is_string($_SERVER['PHP_AUTH_DIGEST']) ) + if( isset($_SERVER['PHP_AUTH_DIGEST']) && is_string($_SERVER['PHP_AUTH_DIGEST']) ){ $AUTH = $_SERVER['PHP_AUTH_DIGEST']; + $_SESSION['WS'] = true; + } /* (2) Si SESSION déja connectée -> no récupère le token */ elseif( isset($_SESSION['TOKEN']) && is_string($_SESSION['TOKEN']) ) diff --git a/build/api/core/Response.php b/build/api/core/Response.php index aaacd2e..5cd3e82 100755 --- a/build/api/core/Response.php +++ b/build/api/core/Response.php @@ -127,6 +127,7 @@ return json_encode($returnData); } - } + + } ?>