views:

1597

answers:

2

In applicationContext.xml, it is valid to defined mmultiple security:custom-authentication-provider ?

for example

<bean id="dummyAuthenticationProvider" class="com.user.sample.gwtspring.server.security.JDBCDummyAuthenticationProvider"> <security:custom-authentication-provider /> </bean>

<bean id="dummyAuthenticationProvider2" class="com.user.sample.gwtspring.server.security.OpenIdDummyAuthenticationProvider2"> <security:custom-authentication-provider /> </bean>

will both be registered inside authenticationManager? I am thinking of using dummyAuthenticationProvider2 as openId. what other metaconfig i need to put inside applicationContext.xml?

A: 

It should register both providers with the authentication manager. When automatically configured the auth manager is set up with a list of providers to perform authentication (anonymous provider, remember me provider, etc..)

http://static.springsource.org/spring-security/site/docs/2.0.x/reference/authentication-common-auth-services.html

oneBelizean
A: 

Yes, both authentication providers will be registered with authentication manager. No other config is required.

novice