SEC-636: Support for use of "ref" attribute in salt-source element.
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user