views:

980

answers:

1

i have a bean in xml like below

<bean id="theCustomAuthenticationProvider" class="test.custom.CustomAuthenticationProvider">
<security:custom-authentication-provider />

a.may i know what does security:custom-authentication-provider means when i put it in my bean like above?

b. do i need to create

<bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager"> ref to theCustomAuthenticationProvider

in the xml ?

c. if b. answer is yes, alternatively, can i use ref of theCustomAuthenticationProviderinside tag?

+1  A: 

The idea is that marking a bean:

<security:custom-authentication-provider />

Will registor the bean as a authentication provider with the AuthenicationManager provided by spring security. You don't need b.

Gareth Davis