Skip to content

Commit

Permalink
Fixes for #34 overlooked select method inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
lucadegasperi committed Dec 11, 2013
1 parent b77ebc1 commit 2543f09
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/LucaDegasperi/OAuth2Server/Repositories/FluentSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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())
Expand Down

0 comments on commit 2543f09

Please sign in to comment.