commit 1257ab7cefcca3e98c36a145f0b57342d9e366d1
parent 393bf4f0667c085734ec98b0c5e6d84f8b3ddded
Author: MTRNord <mtrnord1@gmail.com>
Date: Thu, 1 Jan 2015 12:01:17 +0100
more debug
Diffstat:
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/core/libs/OAuth2/src/fkooman/OAuth/Client/Callback.php b/core/libs/OAuth2/src/fkooman/OAuth/Client/Callback.php
@@ -88,7 +88,6 @@ class Callback
public function handleCallback(array $query)
{
$queryState = isset($query['state']) ? $query['state'] : null;
- echo $queryState;
$queryCode = isset($query['code']) ? $query['code'] : null;
$queryError = isset($query['error']) ? $query['error'] : null;
$queryErrorDescription = isset($query['error_description']) ? $query['error_description'] : null;
@@ -97,6 +96,7 @@ class Callback
throw new CallbackException("state parameter missing");
}
$state = $this->tokenStorage->getState($this->clientConfigId, $queryState);
+ echo $state;
if (false === $state) {
throw new CallbackException("state not found");
}
diff --git a/core/libs/OAuth2/src/fkooman/OAuth/Client/SessionStorage.php b/core/libs/OAuth2/src/fkooman/OAuth/Client/SessionStorage.php
@@ -137,11 +137,10 @@ class SessionStorage implements StorageInterface
public function getState($clientConfigId, $state)
{
- //if (!isset($_SESSION['php-oauth-client']['state'])) {
- // return false;
- //}
- echo "test1";
- foreach ($state as $s) {
+ if (!isset($_SESSION['php-oauth-client']['state'])) {
+ return false;
+ }
+ foreach ($_SESSION['php-oauth-client']['state'] as $s) {
$sessionState = unserialize($s);