diff --git a/src/ResourceServer.php b/src/ResourceServer.php index 697afdf4..79ed9939 100644 --- a/src/ResourceServer.php +++ b/src/ResourceServer.php @@ -138,7 +138,9 @@ class ResourceServer extends AbstractServer */ public function determineAccessToken($headerOnly = false) { - if (!empty($this->getRequest()->headers->get('Authorization'))) { + $authHeader = $this->getRequest()->headers->get('Authorization'); + + if (!empty($authHeader)) { $accessToken = $this->getTokenType()->determineAccessTokenInHeader($this->getRequest()); } elseif ($headerOnly === false && (! $this->getTokenType() instanceof MAC)) { $accessToken = ($this->getRequest()->server->get('REQUEST_METHOD') === 'GET')