File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/LucaDegasperi/OAuth2Server/Filters Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,10 @@ public function filter()
21
21
ResourceServer::isValid (Config::get ('lucadegasperi/oauth2-server-laravel::oauth2.http_headers_only ' ));
22
22
} catch (\League \OAuth2 \Server \Exception \InvalidAccessTokenException $ e ) {
23
23
return Response::json (array (
24
- 'status ' => 403 ,
25
- 'error ' => 'forbidden ' ,
24
+ 'status ' => 401 ,
25
+ 'error ' => 'unauthorized ' ,
26
26
'error_message ' => $ e ->getMessage (),
27
- ), 403 );
27
+ ), 401 );
28
28
}
29
29
30
30
if (func_num_args () > 2 ) {
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public function test_invalid_filter_with_no_scope()
26
26
27
27
$ response = $ this ->getFilter ()->filter ('' , '' );
28
28
$ this ->assertTrue ($ response instanceof Illuminate \Http \JsonResponse);
29
- $ this ->assertTrue ( $ response ->isForbidden ());
29
+ $ this ->assertEquals ( ' 401 ' , $ response ->getStatusCode ());
30
30
31
31
}
32
32
You can’t perform that action at this time.
0 commit comments