mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Use the error returned from the response type
This commit is contained in:
@@ -43,7 +43,7 @@ class ResourceServerMiddleware
|
|||||||
$request = $this->server->getResponseType()->determineAccessTokenInHeader($request);
|
$request = $this->server->getResponseType()->determineAccessTokenInHeader($request);
|
||||||
|
|
||||||
if ($request->getAttribute('oauth_access_token') === null) {
|
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);
|
return $exception->generateHttpResponse($response);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user