less restrictive on Authorization header check

This commit is contained in:
Guy Huynh 2016-09-08 10:20:34 -04:00
parent c5db707e69
commit 491f3f0e95

View File

@ -138,7 +138,7 @@ class ResourceServer extends AbstractServer
*/
public function determineAccessToken($headerOnly = false)
{
if ($this->getRequest()->headers->get('Authorization') !== null) {
if (!empty($this->getRequest()->headers->get('Authorization'))) {
$accessToken = $this->getTokenType()->determineAccessTokenInHeader($this->getRequest());
} elseif ($headerOnly === false && (! $this->getTokenType() instanceof MAC)) {
$accessToken = ($this->getRequest()->server->get('REQUEST_METHOD') === 'GET')