diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-09-19 11:02:16 +0200 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-09-19 11:02:16 +0200 |
commit | 249ded0cad445464239553f5629a59524ae785d7 (patch) | |
tree | 24c520db5feabaa36fcb795609aada38f3d47df4 | |
parent | 42fbebacc80981b145464287f1bbbd8441713652 (diff) | |
download | moa-id-spss-249ded0cad445464239553f5629a59524ae785d7.tar.gz moa-id-spss-249ded0cad445464239553f5629a59524ae785d7.tar.bz2 moa-id-spss-249ded0cad445464239553f5629a59524ae785d7.zip |
solve SLO frontchannel timeout problem
3 files changed, 19 insertions, 5 deletions
diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/slo_template.html b/id/server/data/deploy/conf/moa-id/htmlTemplates/slo_template.html index 88279ee96..6cefe4054 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/slo_template.html +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/slo_template.html @@ -380,7 +380,21 @@ function sloTimeOut() { window.location.href="$timeoutURL"; - } + } + function RestartAfterDelay() { + var eDate = null; + var MilliSekZeit = 0; + var SysDatumJetzt = new Date(); + var SysDatumJetztMilli = SysDatumJetzt.getTime(); + + do { + eDate = new Date(); + MilliSekZeit = eDate.getTime(); + + } while ((MilliSekZeit-SysDatumJetztMilli) < $timeout); + + sloTimeOut(); + } </script> #end @@ -389,7 +403,7 @@ </head> #if($timeoutURL) - <body onload='setTimeout(sloTimeOut(), $timeout);'> + <body onload='setTimeout(sloTimeOut, $timeout);'> #else <body> #end @@ -446,6 +460,5 @@ #foreach( $el in $redirectURLs ) <iframe src=$el class="reqframe"></iframe> #end - </body> </html>
\ No newline at end of file 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 6e1811c8b..532ccb7ba 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 @@ -33,6 +33,7 @@ import at.gv.egovernment.moa.id.auth.builder.RedirectFormBuilder; import at.gv.egovernment.moa.id.commons.db.ConfigurationDBRead; import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils; import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication; +import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.moduls.SSOManager; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.MiscUtil; @@ -63,7 +64,7 @@ public class RedirectServlet extends AuthServlet{ String redirectTarget = DEFAULT_REDIRECTTARGET; try { oa = ConfigurationDBRead.getActiveOnlineApplication(url); - if (oa == null) { + if (oa == null && !url.startsWith(AuthConfigurationProvider.getInstance().getPublicURLPrefix())) { resp.sendError(HttpServletResponse.SC_FORBIDDEN, "Parameters not valid"); return; diff --git a/id/server/idserverlib/src/main/resources/resources/templates/slo_template.html b/id/server/idserverlib/src/main/resources/resources/templates/slo_template.html index 88279ee96..b241e85cf 100644 --- a/id/server/idserverlib/src/main/resources/resources/templates/slo_template.html +++ b/id/server/idserverlib/src/main/resources/resources/templates/slo_template.html @@ -389,7 +389,7 @@ </head> #if($timeoutURL) - <body onload='setTimeout(sloTimeOut(), $timeout);'> + <body onload='setTimeout(sloTimeOut, $timeout);'> #else <body> #end |