Removed auto-config from tutorial sample and added commented out ldap support. Updated ldif file to match sample users.

This commit is contained in:
Luke Taylor 2008-01-23 22:21:39 +00:00
parent b4c37db9f9
commit 342677fabc
2 changed files with 41 additions and 10 deletions

View File

@ -14,7 +14,7 @@
<annotation-driven/> <annotation-driven/>
<http auto-config="true"> <http>
<intercept-url pattern="/secure/extreme/**" access="ROLE_SUPERVISOR"/> <intercept-url pattern="/secure/extreme/**" access="ROLE_SUPERVISOR"/>
<intercept-url pattern="/secure/**" access="IS_AUTHENTICATED_REMEMBERED" /> <intercept-url pattern="/secure/**" access="IS_AUTHENTICATED_REMEMBERED" />
<!-- Disable web URI authorization, as we're using <annotation-driven> and have @Secured the services layer instead <!-- Disable web URI authorization, as we're using <annotation-driven> and have @Secured the services layer instead
@ -23,27 +23,35 @@
--> -->
<intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" /> <intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<!-- All of this is unnecessary if auto-config="true" <!-- All of this is unnecessary if auto-config="true" -->
<form-login /> <form-login />
<anonymous /> <anonymous />
<http-basic /> <http-basic />
<logout /> <logout />
<remember-me /> <remember-me />
<servlet-api-integration />
-->
<concurrent-session-control max-sessions="1" exception-if-maximum-exceeded="true"/> <concurrent-session-control max-sessions="1" exception-if-maximum-exceeded="true"/>
</http> </http>
<!--
Usernames/Passwords are
rod/koala
dianne/emu
scott/wombat
-->
<!--
<ldap-server ldif="classpath:users.ldif" />
<ldap-authentication-provider />
-->
<authentication-provider> <authentication-provider>
<password-encoder hash="md5"/> <password-encoder hash="md5"/>
<user-service> <user-service>
<user name="rod" password="a564de63c2d0da68cf47586ee05984d7" authorities="ROLE_SUPERVISOR,ROLE_USER,ROLE_TELLER" /> <!-- koala --> <user name="rod" password="a564de63c2d0da68cf47586ee05984d7" authorities="ROLE_SUPERVISOR,ROLE_USER,ROLE_TELLER" />
<user name="dianne" password="65d15fe9156f9c4bbffd98085992a44e" authorities="ROLE_USER,ROLE_TELLER" /> <!-- emu --> <user name="dianne" password="65d15fe9156f9c4bbffd98085992a44e" authorities="ROLE_USER,ROLE_TELLER" />
<user name="scott" password="2b58af6dddbd072ed27ffc86725d7d3a" authorities="ROLE_USER" /> <!-- wombat --> <user name="scott" password="2b58af6dddbd072ed27ffc86725d7d3a" authorities="ROLE_USER" />
<user name="peter" password="22b5c9accc6e1ba628cedc63a72d57f8" authorities="ROLE_USER" /> <!-- opal -->
</user-service> </user-service>
</authentication-provider> </authentication-provider>
</beans:beans> </beans:beans>

View File

@ -18,17 +18,40 @@ sn: Johnson
uid: rod uid: rod
userPassword: koala userPassword: koala
dn: uid=dianne,ou=people,dc=springframework,dc=org
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
cn: Dianne Emu
sn: Emu
uid: dianne
userPassword: emu
dn: uid=scott,ou=people,dc=springframework,dc=org
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
cn: Scott
sn: Wombat
uid: scott
userPassword: wombat
dn: cn=user,ou=groups,dc=springframework,dc=org dn: cn=user,ou=groups,dc=springframework,dc=org
objectclass: top objectclass: top
objectclass: groupOfNames objectclass: groupOfNames
cn: user cn: user
member: uid=rod,ou=people,dc=springframework,dc=org member: uid=rod,ou=people,dc=springframework,dc=org
member: uid=dianne,ou=people,dc=springframework,dc=org
member: uid=scott,ou=people,dc=springframework,dc=org
dn: cn=teller,ou=groups,dc=springframework,dc=org dn: cn=teller,ou=groups,dc=springframework,dc=org
objectclass: top objectclass: top
objectclass: groupOfNames objectclass: groupOfNames
cn: teller cn: teller
member: uid=rod,ou=people,dc=springframework,dc=org member: uid=rod,ou=people,dc=springframework,dc=org
member: dianne=rod,ou=people,dc=springframework,dc=org
dn: cn=supervisor,ou=groups,dc=springframework,dc=org dn: cn=supervisor,ou=groups,dc=springframework,dc=org
objectclass: top objectclass: top