fixes in oauth2 client

This commit is contained in:
yuri
2015-03-10 10:14:52 +02:00
parent 0c6df91604
commit 16cd135cb7
2 changed files with 2 additions and 2 deletions
@@ -155,7 +155,7 @@ abstract class OAuth2Abstract implements IClient
$code = $r['code'];
}
if ($code == 200) {
if ($code >= 200 && $code < 300) {
return $r['result'];
} else {
$handledData = $this->handleErrorResponse($r);
@@ -233,7 +233,7 @@ class Client
$params['grant_type'] = $grantType;
$httpHeaders = array();
switch ($this->clientAuth) {
switch ($this->tokenType) {
case self::AUTH_TYPE_URI:
case self::AUTH_TYPE_FORM:
$params['client_id'] = $this->clientId;