PM-2112 "Fix: 0016986: REST endpoint PUT /{workspace}/oauth2/token sets.." SOLVED
Issue:
Fix: 0016986: REST endpoint PUT /{workspace}/oauth2/token sets the HTTP status to 200 (OK) when error
Cause:
Al obtener un "access token" con informacion erronea, no se define correctamente el response de error
Solution:
Se revierte el 1er cambio y se aplica un "exit(0);", ya que el status code se sobre escribia
This commit is contained in:
@@ -309,17 +309,9 @@ class Server implements iAuthenticate
|
|||||||
if ($returnResponse) {
|
if ($returnResponse) {
|
||||||
return $response;
|
return $response;
|
||||||
} else {
|
} else {
|
||||||
if ($response->getStatusCode() == 400) {
|
$response->send();
|
||||||
$msg = $response->getParameter("error_description", "");
|
|
||||||
$msg = ($msg != "")? $msg : $response->getParameter("error", "");
|
|
||||||
|
|
||||||
$rest = new \Maveriks\Extension\Restler();
|
exit(0);
|
||||||
$rest->setMessage(new \Luracast\Restler\RestException(\ProcessMaker\Services\Api::STAT_APP_EXCEPTION, $msg));
|
|
||||||
|
|
||||||
exit(0);
|
|
||||||
} else {
|
|
||||||
$response->send();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user