mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 16:33:07 +05:30
Use the error returned from the response type
This commit is contained in:
parent
212938d1e2
commit
f1d06e7c33
@ -43,7 +43,7 @@ class ResourceServerMiddleware
|
||||
$request = $this->server->getResponseType()->determineAccessTokenInHeader($request);
|
||||
|
||||
if ($request->getAttribute('oauth_access_token') === null) {
|
||||
$exception = OAuthServerException::accessDenied('Access token was invalid');
|
||||
$exception = OAuthServerException::accessDenied($request->getAttribute('oauth_access_token_error'));
|
||||
|
||||
return $exception->generateHttpResponse($response);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user