2012-02-12 02:55:42 -03:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
|
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
|
|
xmlns:sec="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-3.1.xsd
|
|
|
|
http://www.springframework.org/schema/security
|
2012-11-10 17:19:28 -03:00
|
|
|
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
|
2012-02-21 16:36:19 -03:00
|
|
|
|
2012-02-12 21:57:11 -03:00
|
|
|
<sec:http pattern="/css/**" security="none"/>
|
|
|
|
<sec:http pattern="/js/**" security="none"/>
|
|
|
|
<sec:http pattern="/images/**" security="none"/>
|
2012-02-21 14:22:43 -03:00
|
|
|
<sec:http pattern="/icons/**" security="none"/>
|
2012-02-12 02:55:42 -03:00
|
|
|
<sec:http pattern="/favicon.ico" security="none"/>
|
2012-06-03 11:16:38 -03:00
|
|
|
|
|
|
|
<sec:http pattern="/c/login" security="none"/>
|
2013-03-17 23:17:55 -03:00
|
|
|
<sec:http pattern="/c/loginopenid" security="none"/>
|
2012-06-16 19:27:22 -03:00
|
|
|
<sec:http pattern="/c/user/registration" security="none"/>
|
2012-06-16 15:59:59 -03:00
|
|
|
<sec:http pattern="/c/user/resetpassword" security="none"/>
|
2012-06-03 11:16:38 -03:00
|
|
|
<sec:http pattern="/c/home" security="none"/>
|
2012-06-18 00:40:42 -03:00
|
|
|
|
2012-06-03 20:23:31 -03:00
|
|
|
<sec:http pattern="/c/maps/*/embed" security="none"/>
|
2012-08-26 16:53:33 -03:00
|
|
|
<sec:http pattern="/c/maps/*/try" security="none"/>
|
2012-06-18 00:40:42 -03:00
|
|
|
<sec:http pattern="/c/maps/*/public" security="none"/>
|
2012-06-21 22:18:04 -03:00
|
|
|
<sec:http pattern="/c/GCFInstall" security="none"/>
|
2013-02-07 21:44:20 -03:00
|
|
|
<sec:http pattern="/c/restful/maps/*/document/xml-pub" security="none"/>
|
2012-06-21 22:18:04 -03:00
|
|
|
|
2012-06-18 00:40:42 -03:00
|
|
|
<sec:http pattern="/c/publicview.htm" security="none"/>
|
|
|
|
<sec:http pattern="/c/embeddedview.htm" security="none"/>
|
|
|
|
<sec:http pattern="/c/termsOfUse" security="none"/>
|
|
|
|
<sec:http pattern="/c/keyboard" security="none"/>
|
2012-06-03 20:23:31 -03:00
|
|
|
|
|
|
|
<sec:http pattern="/c/activation" security="none"/>
|
2012-06-03 11:16:38 -03:00
|
|
|
<sec:http pattern="/c/try" security="none"/>
|
2012-06-18 00:40:42 -03:00
|
|
|
|
2012-02-19 21:07:24 -03:00
|
|
|
|
2012-11-10 17:19:28 -03:00
|
|
|
<sec:http use-expressions="true" create-session="stateless" pattern="/service/**">
|
2012-02-21 14:22:43 -03:00
|
|
|
<sec:intercept-url pattern="/service/admin/users/**" access="isAuthenticated() and hasRole('ROLE_ADMIN')"/>
|
2012-06-18 01:15:46 -03:00
|
|
|
<sec:intercept-url pattern="/service/**" access="isAuthenticated() and hasRole('ROLE_USER')"/>
|
2012-02-12 21:57:11 -03:00
|
|
|
<sec:http-basic/>
|
|
|
|
</sec:http>
|
2012-02-12 02:55:42 -03:00
|
|
|
|
2012-06-03 11:16:38 -03:00
|
|
|
<sec:http use-expressions="true" access-denied-page="/c/login">
|
2012-11-10 17:19:28 -03:00
|
|
|
<sec:intercept-url pattern="/c/restful/admin/users/**" access="isAuthenticated() and hasRole('ROLE_ADMIN')"/>
|
2012-06-18 01:15:46 -03:00
|
|
|
<sec:intercept-url pattern="/c/**/*" access="isAuthenticated() and hasRole('ROLE_USER')"/>
|
2012-11-10 17:19:28 -03:00
|
|
|
|
2012-06-03 11:16:38 -03:00
|
|
|
<sec:form-login login-page="/c/login"
|
2012-11-10 17:19:28 -03:00
|
|
|
authentication-success-handler-ref="authenticationSuccessHandler"
|
|
|
|
always-use-default-target="false"
|
2012-06-03 11:16:38 -03:00
|
|
|
authentication-failure-url="/c/login?login_error=2"
|
2012-05-13 18:28:00 -03:00
|
|
|
login-processing-url="/c/j_spring_security_check"/>
|
2013-03-10 19:07:52 -03:00
|
|
|
|
2013-03-17 16:39:50 -03:00
|
|
|
<sec:openid-login user-service-ref="userDetailsService"
|
|
|
|
authentication-failure-url="/c/login.jsp?login_error=true"
|
|
|
|
login-processing-url="/c/j_spring_openid_security_check">
|
|
|
|
|
|
|
|
<sec:attribute-exchange identifier-match="https://www.google.com/.*">
|
|
|
|
<sec:openid-attribute name="email" type="http://axschema.org/contact/email" required="true" count="1"/>
|
|
|
|
<sec:openid-attribute name="firstname" type="http://axschema.org/namePerson/first" required="true"/>
|
|
|
|
<sec:openid-attribute name="lastname" type="http://axschema.org/namePerson/last" required="true"/>
|
|
|
|
</sec:attribute-exchange>
|
|
|
|
|
|
|
|
<sec:attribute-exchange identifier-match=".*yahoo.com.*">
|
|
|
|
<sec:openid-attribute name="email" type="http://axschema.org/contact/email" required="true"/>
|
|
|
|
<sec:openid-attribute name="fullname" type="http://axschema.org/namePerson" required="true"/>
|
|
|
|
</sec:attribute-exchange>
|
|
|
|
|
2013-03-17 23:17:55 -03:00
|
|
|
<sec:attribute-exchange identifier-match=".*yahoo.com.*">
|
|
|
|
<sec:openid-attribute name="email" type="http://axschema.org/contact/email" required="true"/>
|
|
|
|
<sec:openid-attribute name="fullname" type="http://axschema.org/namePerson" required="true"/>
|
|
|
|
</sec:attribute-exchange>
|
|
|
|
|
2013-03-17 16:39:50 -03:00
|
|
|
<sec:attribute-exchange identifier-match=".*myopenid.com.*">
|
|
|
|
<sec:openid-attribute name="email" type="http://schema.openid.net/contact/email" required="true"/>
|
|
|
|
<sec:openid-attribute name="fullname" type="http://schema.openid.net/namePerson" required="true"/>
|
|
|
|
</sec:attribute-exchange>
|
|
|
|
</sec:openid-login>
|
2012-04-05 00:40:39 -03:00
|
|
|
<sec:remember-me key="wisemapping-hashed-key"/>
|
2012-06-03 11:16:38 -03:00
|
|
|
<sec:logout logout-url="/c/logout" invalidate-session="true" logout-success-url="/c/login"/>
|
2012-02-12 02:55:42 -03:00
|
|
|
</sec:http>
|
|
|
|
|
2013-02-17 23:10:04 -03:00
|
|
|
<bean id="encoder" class="com.wisemapping.security.CustomPasswordEncoder"/>
|
|
|
|
|
|
|
|
<import resource="wisemapping-security-${security.type}.xml"/>
|
2012-02-12 02:55:42 -03:00
|
|
|
|
2012-02-21 16:36:19 -03:00
|
|
|
<bean id="userDetailsService" class="com.wisemapping.security.UserDetailsService">
|
2012-06-23 16:15:59 -03:00
|
|
|
<property name="userService" ref="userService"/>
|
2012-02-21 16:36:19 -03:00
|
|
|
<property name="adminUser" value="${admin.user}"/>
|
2012-02-12 02:55:42 -03:00
|
|
|
</bean>
|
2012-11-10 17:19:28 -03:00
|
|
|
|
|
|
|
<bean id="authenticationSuccessHandler" class="com.wisemapping.security.AuthenticationSuccessHandler">
|
|
|
|
<property name="defaultTargetUrl" value="/c/maps/"/>
|
|
|
|
<property name="alwaysUseDefaultTargetUrl" value="false"/>
|
|
|
|
</bean>
|
2013-02-17 21:00:08 -03:00
|
|
|
|
2012-02-12 02:55:42 -03:00
|
|
|
</beans>
|