authjwt : as jwt return an object, must cast the result as array
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5789 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -61,7 +61,7 @@ class authjwt extends auth
|
||||
// The JWT was tested in authparams. End of process
|
||||
if (! empty ($payload))
|
||||
{
|
||||
$this->payload = $payload;
|
||||
$this->payload = (array)$payload;
|
||||
$this->payload["bearer"] = substr ($_SERVER["HTTP_AUTHENTICATION"], 7);
|
||||
}
|
||||
if (! key_exists ("email", $this->payload))
|
||||
@@ -71,7 +71,7 @@ class authjwt extends auth
|
||||
/** Return all the parameters recorded for the authenticate user */
|
||||
public function getdetails ()
|
||||
{
|
||||
if ($this->payload === null)
|
||||
if ($this->payload["email"] === "anonymous")
|
||||
return array ("lastname" => "anonymous",
|
||||
"firstname" => "",
|
||||
"email" => "anonymous");
|
||||
|
||||
Reference in New Issue
Block a user