aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib
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:43:52 +0200
commit58c843aa630c1e6fd2680cf019f7e270abbe9a69 (patch)
tree994f808ea640b5744f28531f7279bdb4603d2600 /id/server/idserverlib
parentbeabac60dd7474ad409c90d742d3b245e93ddc66 (diff)
downloadmoa-id-spss-58c843aa630c1e6fd2680cf019f7e270abbe9a69.tar.gz
moa-id-spss-58c843aa630c1e6fd2680cf019f7e270abbe9a69.tar.bz2
moa-id-spss-58c843aa630c1e6fd2680cf019f7e270abbe9a69.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')
-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).