authentication : do not display the script for JWT remove if in JSON request
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5823 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -124,7 +124,9 @@ class authentication
|
|||||||
// Unset the JSON Web Token as the authentication
|
// Unset the JSON Web Token as the authentication
|
||||||
if ($this->route->debug)
|
if ($this->route->debug)
|
||||||
echo "<tt>Unset the JSON Web Token '$tokenName'</tt><br/>\n";
|
echo "<tt>Unset the JSON Web Token '$tokenName'</tt><br/>\n";
|
||||||
echo "<script>localStorage.removeItem('$tokenName');</script>\n";
|
if (! key_exists ("CONTENT_TYPE", $_SERVER) ||
|
||||||
|
$_SERVER["CONTENT_TYPE"] !== "application/json")
|
||||||
|
echo "<script>localStorage.removeItem('$tokenName');</script>\n";
|
||||||
$algorithm = "HS256";
|
$algorithm = "HS256";
|
||||||
$cipherKey = null;
|
$cipherKey = null;
|
||||||
$cacheDir = "data/jwtCache";
|
$cacheDir = "data/jwtCache";
|
||||||
|
|||||||
Reference in New Issue
Block a user