Announcement Announcement Module
Collapse
No announcement yet.
Multiple authentication-providers, different modules? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple authentication-providers, different modules?

    My application is built from multiple modules. Some Spring config exists in each module, and is accumulated by includes in the context xml.

    I'm trying to use two AuthenticationProviders, where each is defined in different modules:

    Web Module A depends on Service Module B.

    Module B defines (non-web) Spring Security components including:

    Code:
        <authentication-manager alias="refAuthenticationManager">
            <authentication-provider user-service-ref="refUserDetailsService"/>
        </authentication-manager>
    Module A's Spring context XML includes Module B's.

    Module A adds more (web-oriented) Spring Security config.

    I would like to define my second AuthenticationProvider in Module A, and have the authentication-manager that was defined in Module B know about it.

    Is there a way to add/accumulate more AuthenticationProviders after an authentication-manager has already been defined for the context?

  • #2
    You could use a BeanPostProcessor as is show in the FAQ.

    Comment


    • #3
      Hi Cherron,

      did u got any solutions for this?. I have two modules **/admin/* (browser requests) and **/webservices/* (webservice requests), first one should authenticated against one LDAP and another one against different LDAP. Did u got any solution. Can u pls help?

      Thanks,
      Logu

      Comment

      Working...
      X