diff options
Diffstat (limited to 'ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/auth')
-rw-r--r-- | ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/auth/LoginStrategy.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/auth/LoginStrategy.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/auth/LoginStrategy.java index a1a415c0..fc415888 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/auth/LoginStrategy.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/auth/LoginStrategy.java @@ -48,6 +48,7 @@ import javax.servlet.http.HttpServletResponse; import org.onap.portalsdk.core.command.LoginBean; import org.onap.portalsdk.core.domain.RoleFunction; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.portalsdk.core.menu.MenuProperties; import org.onap.portalsdk.core.onboarding.exception.PortalAPIException; import org.onap.portalsdk.core.onboarding.listener.PortalTimeoutHandler; @@ -69,6 +70,7 @@ public abstract class LoginStrategy { public static final String EP_SERVICE = "EPService"; public static final String USER_ID = "UserId"; public static final String ERROR_MESSAGE_KEY = "error"; + private String welcomeView; @Autowired private LoginService loginService; @@ -107,9 +109,23 @@ public abstract class LoginStrategy { SystemProperties.getProperty(SystemProperties.LOGIN_METHOD_BACKDOOR), roleFunctionList); initateSessionMgtHandler(request); // user has been authenticated, now take them to the welcome page - return new ModelAndView("redirect:welcome"); + //return new ModelAndView("redirect:welcome"); + + // if user has been authenticated, now take them to the welcome page. + if (getWelcomeView() == null || getWelcomeView().equals("")) + return new ModelAndView("redirect:" + DEFAULT_SUCCESS_VIEW); + else + return new ModelAndView("redirect:" + getWelcomeView()); } } + + public String getWelcomeView() { + return welcomeView; + } + + public void setWelcomeView(String welcomeView) { + this.welcomeView = welcomeView; + } protected void invalidateExistingSession(HttpServletRequest request) { request.getSession().invalidate(); |