Changes to namespace reinstating authentication-provider element in preference to "repository" to wrap convey that a user-service will be used as to authenticate against. Also introduced separate password-encoder element for use within authentication-provider.
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/security"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
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">
|
||||
|
||||
<beans:bean id="myDetails" class="org.springframework.security.config.CustomUserDetailsService"/>
|
||||
|
||||
<repository>
|
||||
<custom-user-service ref="myDetails"/>
|
||||
</repository>
|
||||
|
||||
</beans:beans>
|
||||
@@ -25,12 +25,12 @@ http://www.springframework.org/schema/security http://www.springframework.org/sc
|
||||
<remember-me key="doesntmatter" token-repository="tokenRepo"/>
|
||||
</http>
|
||||
|
||||
<repository>
|
||||
<authentication-provider>
|
||||
<user-service>
|
||||
<user name="bob" password="bobspassword" authorities="ROLE_A,ROLE_B" />
|
||||
<user name="bill" password="billspassword" authorities="ROLE_A,ROLE_B,AUTH_OTHER" />
|
||||
</user-service>
|
||||
</repository>
|
||||
</authentication-provider>
|
||||
|
||||
<beans:bean name="tokenRepo" class="org.springframework.security.ui.rememberme.InMemoryTokenRepositoryImpl"/>
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ http://www.springframework.org/schema/security http://www.springframework.org/sc
|
||||
<beans:property name="password" value=""/>
|
||||
</beans:bean>
|
||||
|
||||
<repository>
|
||||
<jdbc-user-service data-source="dataSource"/>
|
||||
</repository>
|
||||
<jdbc-user-service data-source="dataSource"/>
|
||||
|
||||
<jdbc-user-service id="customUserService" data-source="dataSource"/>
|
||||
|
||||
</beans:beans>
|
||||
@@ -16,11 +16,11 @@ http://www.springframework.org/schema/security http://www.springframework.org/sc
|
||||
</intercept-methods>
|
||||
</b:bean>
|
||||
|
||||
<repository>
|
||||
<authentication-provider>
|
||||
<user-service>
|
||||
<user name="bob" password="bobspassword" authorities="ROLE_A,ROLE_B" />
|
||||
<user name="bill" password="billspassword" authorities="ROLE_A,ROLE_B,AUTH_OTHER" />
|
||||
</user-service>
|
||||
</repository>
|
||||
</authentication-provider>
|
||||
|
||||
</b:beans>
|
||||
Reference in New Issue
Block a user