Use first array result

This commit is contained in:
Alex Bilbie 2016-01-17 14:56:35 +00:00
parent f1d06e7c33
commit 419cb6d149

View File

@ -79,7 +79,7 @@ class BearerTokenResponse extends AbstractResponseType
public function determineAccessTokenInHeader(ServerRequestInterface $request)
{
$header = $request->getHeader('authorization');
$jwt = trim(preg_replace('/^(?:\s+)?Bearer\s/', '', $header));
$jwt = trim(preg_replace('/^(?:\s+)?Bearer\s/', '', $header[0]));
try {
// Attempt to parse and validate the JWT