]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - modules/server/org.argeo.slc.webapp.war/WEB-INF/security.xml
Remove old transition files
[gpl/argeo-slc.git] / modules / server / org.argeo.slc.webapp.war / WEB-INF / security.xml
index 32db8e1d09aac95460f2f6b0e51e809425ef3a5d..9ae3de4a8cc59b0b922780f775b436a96429f373 100644 (file)
@@ -1,21 +1,43 @@
-<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.4.xsd">
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:security="http://www.springframework.org/schema/security"
+       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.5.xsd
+       http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
 
-       <http realm="User Interface" >
-               <intercept-url pattern="/**" access="ROLE_USER,ROLE_ANONYMOUS,ROLE_ADMIN" />
-               <http-basic />
-               <anonymous />
-       </http>
+       <bean id="authenticationEntryPoint"
+               class="org.springframework.security.ui.webapp.AuthenticationProcessingFilterEntryPoint">
+               <property name="loginFormUrl"
+                       value="http://localhost/org.argeo.security.webapp/getCredentials.ria" />
+               <property name="forceHttps" value="false" />
+       </bean>
 
-       <authentication-provider>
-               <user-service>
-                       <user name="mbaudier" password="mbaudier" authorities="ROLE_USER,ROLE_ADMIN" />
-                       <user name="cdujeu" password="cdujeu" authorities="ROLE_USER" />
-                       <user name="test" password="test" authorities="ROLE_USER" />
-                       <user name="demo" password="demo" authorities="ROLE_USER" />
-               </user-service>
-       </authentication-provider>
+       <security:http entry-point-ref="authenticationEntryPoint">
+               <security:intercept-url pattern="/*.service"
+                       access="ROLE_USER,ROLE_ADMIN,ROLE_ANONYMOUS" />
+               <security:anonymous username="anonymous"
+                       granted-authority="ROLE_ANONYMOUS" />
+               <security:remember-me key="argeo" services-ref="rememberMeServices" />
+       </security:http>
 
-</beans:beans>
+       <bean id="rememberMeServices" class="org.argeo.security.mvc.ArgeoRememberMeServices">
+               <property name="alwaysRemember" value="true" />
+               <property name="userDetailsService" ref="userDetailsService" />
+               <property name="key" value="${argeo.security.systemKey}" />
+       </bean>
+
+       <!--
+
+
+               <bean id="authenticationProcessingFilter"
+               class="org.springframework.security.ui.webapp.AuthenticationProcessingFilter">
+               <security:custom-filter position="AUTHENTICATION_PROCESSING_FILTER" />
+               <property name="authenticationManager" ref="_authenticationManager" />
+               <property name="authenticationFailureUrl" value="/getCredentials.ria"
+               /> <property name="defaultTargetUrl" value="/getCredentials.ria" />
+               <property name="filterProcessesUrl" value="/login.ria" /> <property
+               name="usernameParameter" value="username" /> <property
+               name="passwordParameter" value="password" /> </bean>
+       -->
+</beans>
\ No newline at end of file