Skip to content

Commit

Permalink
Merge pull request #72 from lucadegasperi/pr/71
Browse files Browse the repository at this point in the history
Merging changes to the oauth filter
  • Loading branch information
Luca Degasperi committed Mar 26, 2014
2 parents c042aa9 + f030e75 commit 7ca8e3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/LucaDegasperi/OAuth2Server/Filters/OAuthFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public function filter()
ResourceServer::isValid(Config::get('lucadegasperi/oauth2-server-laravel::oauth2.http_headers_only'));
} catch (\League\OAuth2\Server\Exception\InvalidAccessTokenException $e) {
return Response::json(array(
'status' => 403,
'error' => 'forbidden',
'status' => 401,
'error' => 'unauthorized',
'error_message' => $e->getMessage(),
), 403);
), 401);
}

if (func_num_args() > 2) {
Expand Down
2 changes: 1 addition & 1 deletion tests/OAuthFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function test_invalid_filter_with_no_scope()

$response = $this->getFilter()->filter('', '');
$this->assertTrue($response instanceof Illuminate\Http\JsonResponse);
$this->assertTrue($response->isForbidden());
$this->assertEquals('401', $response->getStatusCode());

}

Expand Down

0 comments on commit 7ca8e3e

Please sign in to comment.