2 changed files with 74 additions and 71 deletions
@ -1,50 +0,0 @@
@@ -1,50 +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"> |
||||
|
||||
<!-- All combinations should authenticate as bob/bobspassword --> |
||||
|
||||
<authentication-provider> |
||||
<user-service> |
||||
<user name="bob" password="bobspassword" authorities="ROLE_A" /> |
||||
</user-service> |
||||
</authentication-provider> |
||||
|
||||
<authentication-provider user-service-ref="myUserService" /> |
||||
|
||||
<user-service id="myUserService"> |
||||
<user name="bob" password="bobspassword" authorities="ROLE_A" /> |
||||
</user-service> |
||||
|
||||
<authentication-provider> |
||||
<password-encoder hash="md5"/> |
||||
<user-service> |
||||
<user name="bob" password="12b141f35d58b8b3a46eea65e6ac179e" authorities="ROLE_A" /> |
||||
</user-service> |
||||
</authentication-provider> |
||||
|
||||
<authentication-provider> |
||||
<password-encoder hash="{sha}"/> |
||||
<user-service> |
||||
<user name="bob" password="{SSHA}PpuEwfdj7M1rs0C2W4ssSM2XEN/Y6S5U" authorities="ROLE_A" /> |
||||
</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> |
||||
Loading…
Reference in new issue