Understanding authentication providers in Spring security

I am trying to understand authentication providers in Spring (3.1) and I have a question to what is really happening here. I know that I use the namespace that gives easier access to functionality and configuration in the security module.

When I have the following tags I get a provider manager which have a list of authentication providers. Now as I look at the AuthenticationProvider interface I wonder what kind of providers I get? Am I right that I get a DaoAuthenticationProvider? Do I get other providers and how is it able to find out which providers to register (if this is how it is done)?

<security:authentication-manager>
    <security:authentication-provider>
        <security:jdbc-user-service data-source-ref="dataSource"  />
    </security:authentication-provider>
</security:authentication-manager>

Answers


That's right you are going to get a DaoAuthenticationProvider with the above config. The documentation for <authentication-provider> clearly states:

Unless used with a ref attribute, this element is shorthand for configuring a DaoAuthenticationProvider.

The <authentication-provider> tag is parsed by AuthenticationProviderBeanDefinitionParser which invariably registers a DaoAuthenticationProvider injected with the specified UserDetailsService and other collaborators (passwordEncoder, saltSource, etc.).


Need Your Help

Why can I not compile an object in Dynamics NAV containing an OCX?

ole navision dynamics-nav

I imported a Form object from a text file. When I try to compile it I get the following error message:

JavaScript Debugger

javascript ide editor debugging

Does anyone know of a really good editor to debug JavaScript (other then Visual Studio 2008 and FireBug)?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.