-
Notifications
You must be signed in to change notification settings - Fork 219
/
applicationContext-security.xml
41 lines (35 loc) · 1.92 KB
/
applicationContext-security.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?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"
xmlns:context="http://www.springframework.org/schema/context"
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
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<context:component-scan base-package="fr.ippon.tatami.security"/>
<http pattern="/tatami/login" security="none"/>
<http pattern="/tatami/about" security="none"/>
<http auto-config="true" use-expressions="true">
<intercept-url pattern="/**" access="isAuthenticated()"/>
<form-login
login-processing-url="/tatami/authentication"
login-page="/tatami/login"
authentication-failure-url="/tatami/login?error=true"
default-target-url="/tatami/"
always-use-default-target="true"
authentication-success-handler-ref="tatamiAuthenticationSuccessHandler"/>
<remember-me user-service-ref="userDetailsService"/>
<logout logout-url="/tatami/logout"
logout-success-url="/tatami/login"/>
</http>
<authentication-manager>
<authentication-provider user-service-ref="userDetailsService"/>
</authentication-manager>
<user-service id="userDetailsService">
<user name="jdubois" password="password" authorities="ROLE_USER"/>
<user name="tescolan" password="password" authorities="ROLE_USER"/>
</user-service>
</beans:beans>