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) public function determineAccessTokenInHeader(ServerRequestInterface $request)
{ {
$header = $request->getHeader('authorization'); $header = $request->getHeader('authorization');
$jwt = trim(preg_replace('/^(?:\s+)?Bearer\s/', '', $header)); $jwt = trim(preg_replace('/^(?:\s+)?Bearer\s/', '', $header[0]));
try { try {
// Attempt to parse and validate the JWT // Attempt to parse and validate the JWT