Return specific response
This commit is contained in:
parent
3edb962e06
commit
997ade3c34
1 changed files with 5 additions and 1 deletions
|
@ -16,7 +16,11 @@ class VerifyMicropubToken
|
|||
public function handle($request, Closure $next)
|
||||
{
|
||||
if ($request->bearerToken() === null) {
|
||||
abort(401);
|
||||
return response()->json([
|
||||
'response' => 'error',
|
||||
'error' => 'unauthorized',
|
||||
'error_description' => 'No access token was provided in the request',
|
||||
], 401);
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
|
Loading…
Add table
Reference in a new issue