Results 1 to 2 of 2

Thread: Message After Timeout

  1. #1
    Join Date
    Dec 2008
    Posts
    1

    Default Message After Timeout

    When a user times out of my application they are successfully logged out of my application via Acegi. My problem lies in that I can't figure out how to carry the log out reason over to inform the user since the session is killed. I know the solution is probably something simple, but I am not having any luck. I tried creating my own SecurityContextLogoutHandler but everything I try gets blown away when I invalidate the session.

    Thanks

  2. #2
    Join Date
    Oct 2006
    Posts
    100

    Default

    I am doing something like this:

    Code:
    <logout logout-success-url="/login.html" invalidate-session="true" logout-url="/logout.html"/>
    <logout logout-success-url="/login.html" invalidate-session="true" logout-url="/timeout.html"/>
    In the controller i have the redirect for the timeout to login page:
    Code:
    @RequestMapping("/timeout.html")
    	public String timeout(final HttpSession session, final ModelMap model)
    	{
    		session.invalidate();
    		return "redirect:/login.html?timeout=true";
    	}
    And ofcourse on the login page i see what is the parameter passed and show the right message.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •