From d635b3484bdf41b494b6e6107f88ad61f9859af7 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Tue, 15 Mar 2016 21:30:18 +0000 Subject: [PATCH] Fix broken code --- src/ResponseTypes/BearerTokenResponse.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ResponseTypes/BearerTokenResponse.php b/src/ResponseTypes/BearerTokenResponse.php index c161bd3c..04295895 100644 --- a/src/ResponseTypes/BearerTokenResponse.php +++ b/src/ResponseTypes/BearerTokenResponse.php @@ -69,7 +69,9 @@ class BearerTokenResponse extends AbstractResponseType */ public function validateAccessToken(ServerRequestInterface $request) { - $request = parent::validateAccessToken($request); + if ($request->hasHeader('authorization') === false) { + throw OAuthServerException::accessDenied('Missing "Authorization" header'); + } $header = $request->getHeader('authorization'); $jwt = trim(preg_replace('/^(?:\s+)?Bearer\s/', '', $header[0]));