diff --git a/src/LucaDegasperi/OAuth2Server/Repositories/FluentClient.php b/src/LucaDegasperi/OAuth2Server/Repositories/FluentClient.php index a4958194..a212a065 100644 --- a/src/LucaDegasperi/OAuth2Server/Repositories/FluentClient.php +++ b/src/LucaDegasperi/OAuth2Server/Repositories/FluentClient.php @@ -94,6 +94,8 @@ public function getClient($clientId, $clientSecret = null, $redirectUri = null, return false; } + $result = (object) $result; + $metadata = DB::table('oauth_client_metadata')->where('client_id', '=', $result->id)->lists('value', 'key'); return array( diff --git a/src/LucaDegasperi/OAuth2Server/Repositories/FluentScope.php b/src/LucaDegasperi/OAuth2Server/Repositories/FluentScope.php index 68a5700e..7d604ea6 100644 --- a/src/LucaDegasperi/OAuth2Server/Repositories/FluentScope.php +++ b/src/LucaDegasperi/OAuth2Server/Repositories/FluentScope.php @@ -57,6 +57,8 @@ public function getScope($scope, $clientId = null, $grantType = null) return false; } + $result = (object) $result; + return array( 'id' => $result->id, 'scope' => $result->scope, diff --git a/src/LucaDegasperi/OAuth2Server/Repositories/FluentSession.php b/src/LucaDegasperi/OAuth2Server/Repositories/FluentSession.php index 6a44cd2d..4fd80caa 100644 --- a/src/LucaDegasperi/OAuth2Server/Repositories/FluentSession.php +++ b/src/LucaDegasperi/OAuth2Server/Repositories/FluentSession.php @@ -385,6 +385,7 @@ public function getScopes($accessToken) foreach($scopeResults as $key=>$scope) { + $scope = (object) $scope; $scopes[$key] = get_object_vars($scope); } @@ -452,6 +453,7 @@ public function getAuthCodeScopes($oauthSessionAuthCodeId) foreach($scopesResults as $key=>$scope) { + $scope = (object) $scope; $scopes[$key] = get_object_vars($scope); } @@ -497,6 +499,7 @@ public function deleteExpired() return 0; } else { foreach ($expiredSessions as $session) { + $session = (object) $session; DB::table('oauth_sessions') ->where('id', '=', $session->session_id) ->delete();