Announcement Announcement Module
Collapse
No announcement yet.
Just a quick one Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Just a quick one

    Hi Guys,

    Is there a way (using Spring Security 3.1+) to associate a particular intercept-url with a particular authentication-provider (ultimately a specific userDetailsService), for example is it possible to have something like this:


    Code:
         <security:http use-expressions="true">
    		<security:intercept-url pattern="/URL1/**"
    			access="hasRole('ROLE1')" />
    	</security:http>
    
            <security:http use-expressions="true">
    		<security:intercept-url pattern="/URL2/**"
    			access="hasRole('ROLE2')" />
    	</security:http>
    
    
    	<security:authentication-manager>
    		<security:authentication-provider
    			ref="role1Provider" />
    	</security:authentication-manager>
    
            <security:authentication-manager>
    		<security:authentication-provider
    			ref="role2Provider" />
    	</security:authentication-manager>
    to have each url pattern be authenticated with its respective 'provider' ?!

    I searched on the net without success, I also had a look at the 'security' schema (unless I have missed out on something obvious) there doesn't appear to be an obvious link for associating one with another.

    If such an explicit link doesn't exist how would one go about solving this type of problem?

    All ideas are welcome.

    Regards,


    M.

  • #2
    I suggest a read of the reference guide...

    The http element can contain a reference to a specific authentication-manager (attribute authentication-manager-ref). You also need to specify an id for each authentication-manager else one overrides the other.

    Comment


    • #3
      Originally posted by Marten Deinum View Post
      I suggest a read of the reference guide...

      The http element can contain a reference to a specific authentication-manager (attribute authentication-manager-ref). You also need to specify an id for each authentication-manager else one overrides the other.
      Thanks for your quick response.

      M.

      Comment

      Working...
      X