Announcement Announcement Module
No announcement yet.
How to prevent successful login from forwarding on to a resource Page Title Module
Move Remove Collapse
This topic is closed
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to prevent successful login from forwarding on to a resource

    Here is my situation...

    Spring Security works great for my traditional login process.

    I am building a site that uses Tiles for layout; spring+tiles has the AjaxTilesView that allows for reloading a tile based on an ajax call. This is performed with Spring JavaScript decorations and after a controller has fired, the tile should be updated.

    I have replaced my login form with a Dojo modal dialog box containing the form elements and I can successfully login. The tile where this is initiated from has the Spring Security tags behind the scenes and will show the login link if you are not authenticated or a Welcome message if you are. This is the tile that I would like updated after the user has successfully signed in.

    The problem I am facing is that the user is always redirected to the default-target-url setup in the spring security application context. If I remove that it just takes you to '/' which is also not what I want to happen.

    Is there a way to prevent Spring Security from forwarding on to the default-target-url so that the user can stay on the same page and only the tile containing my login link can be updated?

    Is a solution like this better implemented using Spring Security programmaticly, instead of declaratively in the application context?

    Thanks for any help.

  • #2
    I gave up on this feature .. and created custom HTML login form for this matter .. I had the same problem and after digging into it found out that I would have to do a lot of automagic, that is currently done by spring security framework, on my own .. so I gave up and wrote a couple of CSS files to draw the same login form as my javascript framework did.

    Kind regards

    PS: I've spend 2 days figuring how to do this ...