diff --git a/src/Exception/OAuthException.php b/src/Exception/OAuthException.php index dc0dbbfd..5cbb0b3a 100644 --- a/src/Exception/OAuthException.php +++ b/src/Exception/OAuthException.php @@ -71,10 +71,10 @@ class OAuthException extends \Exception if ($this->errorType === 'invalid_client') { $authScheme = null; $request = new Request(); - if ($request->server('PHP_AUTH_USER') !== null) { + if ($request->getUser() !== null) { $authScheme = 'Basic'; } else { - $authHeader = $request->header('Authorization'); + $authHeader = $request->headers->get('Authorization'); if ($authHeader !== null) { if (strpos($authHeader, 'Bearer') === 0) { $authScheme = 'Bearer';