From 2543f09b04c13ec43949cd8c0f8ea720a13b6ade Mon Sep 17 00:00:00 2001 From: Luca Degasperi Date: Wed, 11 Dec 2013 14:43:59 +0100 Subject: [PATCH] Fixes for #34 overlooked select method inclusion --- .../OAuth2Server/Repositories/FluentSession.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/LucaDegasperi/OAuth2Server/Repositories/FluentSession.php b/src/LucaDegasperi/OAuth2Server/Repositories/FluentSession.php index 94918ab2..468c185e 100644 --- a/src/LucaDegasperi/OAuth2Server/Repositories/FluentSession.php +++ b/src/LucaDegasperi/OAuth2Server/Repositories/FluentSession.php @@ -83,7 +83,7 @@ public function removeAuthCode($sessionId) public function validateAuthCode($clientId, $redirectUri, $authCode) { $result = DB::table('oauth_sessions') - ->select(array('oauth_sessions.id as session_id', 'oauth_session_authcodes.id as authcode_id')) + ->select('oauth_sessions.id as session_id', 'oauth_session_authcodes.id as authcode_id') ->join('oauth_session_authcodes', 'oauth_sessions.id', '=', 'oauth_session_authcodes.session_id') ->join('oauth_session_redirects', 'oauth_sessions.id', '=', 'oauth_session_redirects.session_id') ->where('oauth_sessions.client_id', $clientId) @@ -98,7 +98,10 @@ public function validateAuthCode($clientId, $redirectUri, $authCode) public function validateAccessToken($accessToken) { $result = DB::table('oauth_session_access_tokens') - ->select('oauth_sessions.*') + ->select('oauth_session_access_tokens.session_id as session_id', + 'oauth_sessions.client_id as client_id', + 'oauth_sessions.owner_id as owner_id', + 'oauth_sessions.owner_type as owner_type') ->join('oauth_sessions', 'oauth_session_access_tokens.session_id', '=', 'oauth_sessions.id') ->where('access_token', $accessToken) ->where('access_token_expires', '>=', time())