diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-03-25 11:43:47 +0100 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-03-25 11:43:47 +0100 |
commit | b5b43216a7425b0634ed890607c6ce358c01467f (patch) | |
tree | 7776c8059c7899dc315bca9816ceaad286d15d13 /id/server/idserverlib | |
parent | 9d4e0af44440b78359b1dd82772c6c5c1c76848e (diff) | |
download | moa-id-spss-b5b43216a7425b0634ed890607c6ce358c01467f.tar.gz moa-id-spss-b5b43216a7425b0634ed890607c6ce358c01467f.tar.bz2 moa-id-spss-b5b43216a7425b0634ed890607c6ce358c01467f.zip |
add default redirect URL
Diffstat (limited to 'id/server/idserverlib')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/LogOutServlet.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/LogOutServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/LogOutServlet.java index 12cf54e16..800393b30 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/LogOutServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/LogOutServlet.java @@ -54,12 +54,14 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import at.gv.egovernment.moa.id.auth.MOAIDAuthInitializer; +import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.moduls.AuthenticationManager; import at.gv.egovernment.moa.id.moduls.RequestStorage; import at.gv.egovernment.moa.id.moduls.SSOManager; import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage; import at.gv.egovernment.moa.id.util.MOAIDMessageProvider; import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.util.MiscUtil; public class LogOutServlet extends AuthServlet { @@ -80,6 +82,11 @@ public class LogOutServlet extends AuthServlet { //get SSO token from request String ssoid = ssomanager.getSSOSessionID(req); + if (MiscUtil.isEmpty(redirectUrl)) + //set default redirect Target + Logger.debug("Set default RedirectURL back to MOA-ID-Auth"); + redirectUrl = AuthConfigurationProvider.getInstance().getPublicURLPrefix(); + if (ssomanager.isValidSSOSession(ssoid, req)) { //TODO: Single LogOut Implementation @@ -104,7 +111,7 @@ public class LogOutServlet extends AuthServlet { } //Redirect to Application - resp.setStatus(301); + resp.setStatus(302); resp.addHeader("Location", redirectUrl); } |