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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 15
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: 1632
    
    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]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: More than one authentication provider in spring-security?
 
Similar Threads
Weblogic security
Is using Spring Security more secure than providing your own simple authentication?
Ajax Security Libraries
JaxWsPortProxyFactoryBean HttpInvokerServiceExporter security enabled
JAAS vs Spring securit..