From e5a48c929bd825f4f51e7a458502f8f4ab7699a3 Mon Sep 17 00:00:00 2001 From: Jason Grimes Date: Wed, 5 Jun 2013 23:59:29 -0400 Subject: [PATCH 1/3] Make determineAccessToken() public in order to check if an access token was sent before checking its validity. --- src/League/OAuth2/Server/Resource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/League/OAuth2/Server/Resource.php b/src/League/OAuth2/Server/Resource.php index 49f149ee..bc02b961 100644 --- a/src/League/OAuth2/Server/Resource.php +++ b/src/League/OAuth2/Server/Resource.php @@ -242,7 +242,7 @@ class Resource * @throws Exception\MissingAccessTokenException Thrown if there is no access token presented * @return string */ - protected function determineAccessToken($headersOnly = false) + public function determineAccessToken($headersOnly = false) { if ($header = $this->getRequest()->header('Authorization')) { // Check for special case, because cURL sometimes does an From ca4e7499864f1ff1616432b7560c410ae207888c Mon Sep 17 00:00:00 2001 From: "Garrett St. John" Date: Thu, 6 Jun 2013 13:09:15 -0700 Subject: [PATCH 2/3] Fix to docblocks --- src/League/OAuth2/Server/Storage/SessionInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/League/OAuth2/Server/Storage/SessionInterface.php b/src/League/OAuth2/Server/Storage/SessionInterface.php index 08cd4c53..0f2b8f25 100644 --- a/src/League/OAuth2/Server/Storage/SessionInterface.php +++ b/src/League/OAuth2/Server/Storage/SessionInterface.php @@ -74,7 +74,7 @@ interface SessionInterface * @param int $sessionId The session ID * @param string $accessToken The access token * @param int $expireTime Unix timestamp of the access token expiry time - * @return void + * @return int The access token ID */ public function associateAccessToken($sessionId, $accessToken, $expireTime); From 8f15158d1c94201842fdb14ad71cd1348e1e1284 Mon Sep 17 00:00:00 2001 From: "Garrett St. John" Date: Thu, 6 Jun 2013 14:00:17 -0700 Subject: [PATCH 3/3] Fix to docblocks --- src/League/OAuth2/Server/Storage/SessionInterface.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/League/OAuth2/Server/Storage/SessionInterface.php b/src/League/OAuth2/Server/Storage/SessionInterface.php index 0f2b8f25..051c4dbb 100644 --- a/src/League/OAuth2/Server/Storage/SessionInterface.php +++ b/src/League/OAuth2/Server/Storage/SessionInterface.php @@ -315,7 +315,8 @@ interface SessionInterface * * array ( * array( - * 'key' => (string), + * 'id' => (int), + * 'scope' => (string), * 'name' => (string), * 'description' => (string) * ),