aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2017-10-18 15:09:25 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2017-10-18 15:09:25 +0200
commit372717f41f43bb6687fd708aeff153165a7005a9 (patch)
treec9026890d4dc2145344646bc47da6d936345ff65 /id/server/idserverlib
parent4c24b9ed9ec7fe27e490f7872d3c5f6da42506ca (diff)
downloadmoa-id-spss-372717f41f43bb6687fd708aeff153165a7005a9.tar.gz
moa-id-spss-372717f41f43bb6687fd708aeff153165a7005a9.tar.bz2
moa-id-spss-372717f41f43bb6687fd708aeff153165a7005a9.zip
some small refactoring in RedirectServlet
Diffstat (limited to 'id/server/idserverlib')
-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");
}