aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib/src')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java
index 1848fa6f7..be511d888 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java
@@ -49,6 +49,8 @@ import at.gv.egovernment.moa.util.URLEncoder;
@Controller
public class RedirectServlet {
+ public static final String SERVICE_ENDPOINT = "/RedirectServlet";
+
public static final String REDIRCT_PARAM_URL = "redirecturl";
private static final String DEFAULT_REDIRECTTARGET = "_parent";
@@ -74,6 +76,8 @@ public class RedirectServlet {
//validate URL
new java.net.URL(url);
+ //url = URLDecoder.decode(url, "UTF-8");
+
oa = AuthConfigurationProviderFactory.getInstance().getOnlineApplicationParameter(url);
String authURL = HTTPUtils.extractAuthURLFromRequest(req);
@@ -128,12 +132,24 @@ public class RedirectServlet {
resp.addHeader("Location", url);
} else {
- Logger.debug("Redirect to " + url);
+ Logger.debug("Redirect to " + url);
+
+ try {
+ String test = oa.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETREDIRECTTARGET);
+ if (MiscUtil.isNotEmpty(test))
+ redirectTarget = test;
+
+ } catch (Exception e) {
+ Logger.debug("Use default redirectTarget.");
+ }
+
DefaultGUIFormBuilderConfiguration config = new DefaultGUIFormBuilderConfiguration(
authURL,
DefaultGUIFormBuilderConfiguration.VIEW_REDIRECT,
null);
config.putCustomParameter(URL, StringEscapeUtils.escapeHtml(url));
+ config.putCustomParameter(TARGET, redirectTarget);
+
guiBuilder.build(resp, config, "RedirectForm.html");
}