SEC-636: Support for use of "ref" attribute in salt-source element.

This commit is contained in:
Luke Taylor
2008-01-21 15:06:43 +00:00
parent 568211b77f
commit 59a947bbe5
2 changed files with 31 additions and 10 deletions

View File

@@ -6,7 +6,7 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">
<!-- All combinations should authenticate as bob/password -->
<!-- All combinations should authenticate as bob/bobspassword -->
<authentication-provider>
<user-service>
@@ -34,4 +34,17 @@ http://www.springframework.org/schema/security http://www.springframework.org/sc
</user-service>
</authentication-provider>
<!-- External beans for both UserDetailsService and PasswordEncoder -->
<authentication-provider user-service-ref="customUserService">
<password-encoder ref="customPasswordEncoder">
<salt-source user-property="username"/>
</password-encoder>
</authentication-provider>
<beans:bean id="customPasswordEncoder" class="org.springframework.security.providers.encoding.Md5PasswordEncoder"/>
<beans:bean id="customUserService" class="org.springframework.security.userdetails.memory.InMemoryDaoImpl">
<beans:property name="userMap" value="bob=f117f0862384e9497ff4f470e3522606,ROLE_A"/>
</beans:bean>
</beans:beans>