aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib/src/main')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/LogOutServlet.java9
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);
}