aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-10-07 07:42:14 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-10-07 07:42:14 +0200
commit890b5011fce5157d73050517aa0b22dd906fb394 (patch)
tree39ffe7181fed9757fff5d9e471571ae38674d81f /id/server/idserverlib/src
parent140174ab590ec058e6c57dab60b52acc3d929963 (diff)
downloadmoa-id-spss-890b5011fce5157d73050517aa0b22dd906fb394.tar.gz
moa-id-spss-890b5011fce5157d73050517aa0b22dd906fb394.tar.bz2
moa-id-spss-890b5011fce5157d73050517aa0b22dd906fb394.zip
add additional redirect in elga mandate-service selection-process to get out from BKU communication
switch version of elga-mandate-module to 1.1
Diffstat (limited to 'id/server/idserverlib/src')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/DataURLBuilder.java3
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/AbstractAuthServletTask.java15
2 files changed, 17 insertions, 1 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/DataURLBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/DataURLBuilder.java
index 8334780ba..c78361eda 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/DataURLBuilder.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/DataURLBuilder.java
@@ -79,6 +79,9 @@ public class DataURLBuilder {
if (!authBaseURL.endsWith("/"))
authBaseURL += "/";
+ if (authServletName.startsWith("/"))
+ authServletName = authServletName.substring(1);
+
dataURL = authBaseURL + authServletName;
dataURL = addParameter(dataURL, MOAIDAuthConstants.PARAM_TARGET_PENDINGREQUESTID, sessionID);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/AbstractAuthServletTask.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/AbstractAuthServletTask.java
index 84ca9fa05..1b78ff677 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/AbstractAuthServletTask.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/AbstractAuthServletTask.java
@@ -109,8 +109,20 @@ public abstract class AbstractAuthServletTask extends MoaIdTask {
* @param httpResp
*/
protected void performRedirectToProtocolFinialization(IRequest pendingReq, HttpServletResponse httpResp) {
+ performRedirectToItself(pendingReq, httpResp, AbstractAuthProtocolModulController.FINALIZEPROTOCOL_ENDPOINT);
+
+ }
+
+ /**
+ * Redirect the authentication process to MOA-ID-Auth itself
+ *
+ * @param pendingReq Actually processed protocol specific authentication request
+ * @param httpResp
+ * @param moaIDEndPoint Servlet EndPoint that should receive the redirect
+ */
+ protected void performRedirectToItself(IRequest pendingReq, HttpServletResponse httpResp, String moaIDEndPoint) {
String redirectURL = new DataURLBuilder().buildDataURL(pendingReq.getAuthURL(),
- AbstractAuthProtocolModulController.FINALIZEPROTOCOL_ENDPOINT, pendingReq.getRequestID());
+ moaIDEndPoint, pendingReq.getRequestID());
httpResp.setContentType("text/html");
httpResp.setStatus(302);
@@ -119,6 +131,7 @@ public abstract class AbstractAuthServletTask extends MoaIdTask {
}
+
/**
* Parses the request input stream for parameters, assuming parameters are
* encoded UTF-8 (no standard exists how browsers should encode them).