mirror of
https://github.com/wisemapping/wisemapping-open-source.git
synced 2025-04-05 11:56:29 +08:00
72 lines
3.4 KiB
XML
72 lines
3.4 KiB
XML
<?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
|
|
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
|
|
|
|
<bean id="encoder"
|
|
class="com.wisemapping.security.CustomPasswordEncoder"/>
|
|
|
|
<sec:http pattern="/css/**" security="none"/>
|
|
<sec:http pattern="/js/**" security="none"/>
|
|
<sec:http pattern="/images/**" security="none"/>
|
|
<sec:http pattern="/icons/**" security="none"/>
|
|
<sec:http pattern="/favicon.ico" security="none"/>
|
|
|
|
<sec:http pattern="/c/login" security="none"/>
|
|
<sec:http pattern="/c/user/registration" security="none"/>
|
|
<sec:http pattern="/c/user/resetpassword" security="none"/>
|
|
<sec:http pattern="/c/home" security="none"/>
|
|
|
|
<sec:http pattern="/c/maps/*/embed" security="none"/>
|
|
<sec:http pattern="/c/maps/*/try" security="none"/>
|
|
<sec:http pattern="/c/maps/*/public" security="none"/>
|
|
<sec:http pattern="/c/GCFInstall" security="none"/>
|
|
<sec:http pattern="/c/restful/maps/*/document/xml-pub" security="none"/>
|
|
|
|
<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"/>
|
|
|
|
<sec:http pattern="/c/activation" security="none"/>
|
|
<sec:http pattern="/c/try" security="none"/>
|
|
|
|
|
|
<sec:http use-expressions="true" create-session="stateless" pattern="/service/**">
|
|
<sec:intercept-url pattern="/service/admin/users/**" access="isAuthenticated() and hasRole('ROLE_ADMIN')"/>
|
|
<sec:intercept-url pattern="/service/**" access="isAuthenticated() and hasRole('ROLE_USER')"/>
|
|
<sec:http-basic/>
|
|
</sec:http>
|
|
|
|
<sec:http use-expressions="true" access-denied-page="/c/login">
|
|
<sec:intercept-url pattern="/c/restful/admin/users/**" access="isAuthenticated() and hasRole('ROLE_ADMIN')"/>
|
|
<sec:intercept-url pattern="/c/**/*" access="isAuthenticated() and hasRole('ROLE_USER')"/>
|
|
|
|
<sec:form-login login-page="/c/login"
|
|
authentication-success-handler-ref="authenticationSuccessHandler"
|
|
always-use-default-target="false"
|
|
authentication-failure-url="/c/login?login_error=2"
|
|
login-processing-url="/c/j_spring_security_check"/>
|
|
<sec:remember-me key="wisemapping-hashed-key"/>
|
|
<sec:logout logout-url="/c/logout" invalidate-session="true" logout-success-url="/c/login"/>
|
|
</sec:http>
|
|
|
|
<!--<import resource="wisemapping-security-db.xml"/>-->
|
|
<import resource="wisemapping-security-ldap.xml"/>
|
|
|
|
<bean id="userDetailsService" class="com.wisemapping.security.UserDetailsService">
|
|
<property name="userService" ref="userService"/>
|
|
<property name="adminUser" value="${admin.user}"/>
|
|
</bean>
|
|
|
|
<bean id="authenticationSuccessHandler" class="com.wisemapping.security.AuthenticationSuccessHandler">
|
|
<property name="defaultTargetUrl" value="/c/maps/"/>
|
|
<property name="alwaysUseDefaultTargetUrl" value="false"/>
|
|
</bean>
|
|
|
|
</beans> |