This commit is contained in:
Romain Neutron
2012-06-19 10:40:14 +02:00
parent cd78d5566b
commit e28184167e
153 changed files with 183 additions and 568 deletions

View File

@@ -276,7 +276,6 @@ class API_OAuth2_Account
":application_id" => $application->get_id()
);
$stmt = $appbox->get_connection()->prepare($sql);
$stmt->execute($params);
$row = $stmt->fetch(PDO::FETCH_ASSOC);

View File

@@ -398,7 +398,6 @@ class API_OAuth2_Adapter extends OAuth2
, 'redirect_uri' => $request->get('redirect_uri', false)
);
$scope = $request->get('scope', false);
$state = $request->get('state', false);
@@ -426,7 +425,6 @@ class API_OAuth2_Adapter extends OAuth2
, "scope" => array("flags" => FILTER_REQUIRE_SCALAR)
);
$input = filter_var_array($datas, $filters);
/**
@@ -484,7 +482,6 @@ class API_OAuth2_Adapter extends OAuth2
$input["redirect_uri"] = $redirect_uri;
}
/**
* Check response_type
*/
@@ -492,21 +489,18 @@ class API_OAuth2_Adapter extends OAuth2
$this->errorDoRedirectUriCallback($input["redirect_uri"], OAUTH2_ERROR_INVALID_REQUEST, 'Invalid response type.', NULL, $input["state"]);
}
/**
* Check requested auth response type against the list of supported types
*/
if (array_search($input["response_type"], $this->getSupportedAuthResponseTypes()) === FALSE)
$this->errorDoRedirectUriCallback($input["redirect_uri"], OAUTH2_ERROR_UNSUPPORTED_RESPONSE_TYPE, NULL, NULL, $input["state"]);
/**
* Restrict clients to certain authorization response types
*/
if ($this->checkRestrictedAuthResponseType($input["client_id"], $input["response_type"]) === FALSE)
$this->errorDoRedirectUriCallback($input["redirect_uri"], OAUTH2_ERROR_UNAUTHORIZED_CLIENT, NULL, NULL, $input["state"]);
/**
* Validate that the requested scope is supported
*/