updated calls to proper request methods

This commit is contained in:
Luca Degasperi 2014-05-06 14:30:25 +02:00
parent 54c2c48704
commit 07c04d15d7

View File

@ -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';