Massimiliano Assante 7 years ago
parent 190279c64e
commit 3a7f601c71

@ -21,6 +21,7 @@ public class MyVREs implements EntryPoint {
public static final String GET_CONTEXT_PARAMETER = "scope";
public static final String GET_CLIENT_ID_PARAMETER = "client_id";
public static final String GET_CLIENT_SECRET_PARAMETER = "client_secret";
public static final String GET_RESPONSE_TYPE_PARAMETER = "response_type";
public static final String GET_AUTH_TOKEN_PARAMETER = "code";
@ -53,7 +54,10 @@ public class MyVREs implements EntryPoint {
@Override
public void onSuccess(AuthorizationBean result) {
if (result.isSuccess()) {
Location.assign(params.redirectURI+"?"+GET_AUTH_TOKEN_PARAMETER+"="+result.getOAuth2TemporaryCode()+"&"+GET_STATE_PARAMETER+"="+result.getState());
Location.assign(params.redirectURI+"?"
+GET_AUTH_TOKEN_PARAMETER+"="+result.getOAuth2TemporaryCode()+"&"
+GET_STATE_PARAMETER+"="+result.getState()+"&"
+GET_RESPONSE_TYPE_PARAMETER+"=code");
} else {
HTML message = new HTML("There were issues in managing this request: " + result.getErrorDescription());
message.setStyleName("portlet-msg-error");

@ -67,7 +67,10 @@ public class ClickableVRE extends HTML {
@Override
public void onSuccess(AuthorizationBean result) {
if (result.isSuccess()) {
Location.assign(params.getRedirectURI()+"?"+MyVREs.GET_AUTH_TOKEN_PARAMETER+"="+result.getOAuth2TemporaryCode()+"&"+MyVREs.GET_STATE_PARAMETER+"="+result.getState());
Location.assign(params.getRedirectURI()+"?"
+MyVREs.GET_AUTH_TOKEN_PARAMETER+"="+result.getOAuth2TemporaryCode()+"&"
+MyVREs.GET_STATE_PARAMETER+"="+result.getState()+"&"
+MyVREs.GET_RESPONSE_TYPE_PARAMETER+"=code");;
} else {
HTML message = new HTML("There were issues in managing this request: " + result.getErrorDescription());
message.setStyleName("portlet-msg-error");

@ -410,7 +410,7 @@ public class MyVREsServiceImpl extends RemoteServiceServlet implements MyVREsSer
HttpResponse response = httpClient.execute(httpPostRequest);
responseCode = response.getStatusLine().getStatusCode();
if (responseCode < 200 || responseCode >= 300) {
_log.error("failed to patch the product. response status line from "
_log.error("error: response status line from "
+ fullPath2oAuthService + " was: " + responseCode);
return false;
}

Loading…
Cancel
Save