fixes in oauth2 client
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user