Fix broken code

This commit is contained in:
Alex Bilbie 2016-03-15 21:30:18 +00:00
parent 3365f3d733
commit d635b3484b

View File

@ -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]));