aspose file tools*
The moose likes Spring and the fly likes More than one authentication provider in spring-security? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "More than one authentication provider in spring-security?" Watch "More than one authentication provider in spring-security?" New topic
Author

More than one authentication provider in spring-security?

kuldeep sidhu
Greenhorn

Joined: Jan 07, 2014
Posts: 16
I am using spring-security for doing basic authentication in my application. Can we have more than one authentication provider like from xml and from db also. How to configure them?
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1666
    
    7

You can have as many as you would like. It will try them in order and if all have been tried a suitable exception will be thrown. You can provide multiple <security:authentication-provider> tags inside the <security:authentication-manager> namespace. Alternatively you can declare a bean of type org.springframework.security.providers.ProviderManager and set a list of providers on it.


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: More than one authentication provider in spring-security?