Announcement Announcement Module
No announcement yet.
One webapp, two servlets, two Login Entry Points. Page Title Module
Move Remove Collapse
This topic is closed
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • One webapp, two servlets, two Login Entry Points.


    I'm spending more and more time trying to figure out how to provide two different login entry points for user in the same webapp...

    And I came up with an idea of two dispatcher servlets (since it's Spring MVC): one to cover up /user/login and the other for /admin/login/. It's basically because I need user to be able to log in as admin, and then log out as admin without logging out as user...

    But the problem is, how to split Spring Security? Is adding _another_ applicationConfig a good idea? I'm "this" far from going crazy. Anyone?

    Take care!

  • #2
    I am still trying to figure out everything for Spring Security 2.0 (worked with Acegi before), but from reading the docs you should be able to set-up your own custom filter chain (after making the necessary web.xml changes). See section 8.1.

    After setting up the custom filter there look to be multiple ways to go forward. One possible way would be to create two sets of filters, one set for each login context. Then set-up the FilterSecurityInterceptor in each configuration to have different managers and paths they are interested in. That's how we did it with acegi at least. Perhaps there is a better way with Spring Security though.