From 6543ebcd4daf19e7882fb812ba70898d5e7fca1a Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Mon, 29 Apr 2013 00:01:34 +0100 Subject: [PATCH] Updated updateSession code --- src/OAuth2/Grant/AuthCode.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/OAuth2/Grant/AuthCode.php b/src/OAuth2/Grant/AuthCode.php index cee20e03..55b9db76 100644 --- a/src/OAuth2/Grant/AuthCode.php +++ b/src/OAuth2/Grant/AuthCode.php @@ -229,14 +229,12 @@ class AuthCode implements GrantTypeInterface { $accessTokenExpires = time() + $this->authServer->getExpiresIn(); $accessTokenExpiresIn = $this->authServer->getExpiresIn(); - $this->authServer->getStorage('session')->updateSession( - $session['id'], - null, - $accessToken, - $refreshToken, - $accessTokenExpires, - 'granted' - ); + + $accessTokenId = $this->authServer->getStorage('session')->updateSession($session['id'], array( + 'access_token' => $accessToken, + 'access_token_expire' => $accessTokenExpires, + 'refresh_token' => $refreshToken + )); // Associate scopes with the access token if ( ! is_null($session['scope_ids'])) { $scopeIds = explode(',', $session['scope_ids']);