diff options
Diffstat (limited to 'id/server/idserverlib/src/main')
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).
|