1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <beans : beans xmlns =" http://www.springframework.org/schema/security" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xmlns : beans =" http://www.springframework.org/schema/beans"
3+ xsi : schemaLocation ="
4+ http://www.springframework.org/schema/security
5+ http://www.springframework.org/schema/security/spring-security.xsd
6+ http://www.springframework.org/schema/beans
7+ http://www.springframework.org/schema/beans/spring-beans-4.2.xsd"
8+ >
9+
10+ <http use-expressions =" true" >
11+ <intercept-url pattern =" /login*" access =" permitAll" />
12+ <intercept-url pattern =" /logout*" access =" permitAll" />
13+ <intercept-url pattern =" /signin/**" access =" permitAll" />
14+ <intercept-url pattern =" /signup/**" access =" permitAll" />
15+ <intercept-url pattern =" /user/registration*" access =" permitAll" />
16+ <intercept-url pattern =" /regitrationConfirm*" access =" permitAll" />
17+ <intercept-url pattern =" /expiredAccount*" access =" permitAll" />
18+ <intercept-url pattern =" /registration*" access =" permitAll" />
19+ <intercept-url pattern =" /badUser*" access =" permitAll" />
20+ <intercept-url pattern =" /resources/**" access =" permitAll" />
21+ <intercept-url pattern =" /invalidSession*" access =" isAnonymous()" />
22+ <intercept-url pattern =" /**" access =" isAuthenticated()" />
23+ <form-login login-page =' /login.html'
24+ authentication-failure-url=" /login.html?error=true"
25+ authentication-success-handler-ref=" myAuthenticationSuccessHandler"
26+ default-target-url=" /homepage.html" />
27+ <session-management invalid-session-url =" /invalidSession.html"
28+ session-fixation-protection=" none" />
29+ <logout invalidate-session =" false" logout-success-url =" /logout.html?logSucc=true"
30+ logout-url=" /j_spring_security_logout" delete-cookies =" JSESSIONID" />
31+ </http >
32+
33+ <beans : bean id =" myAuthenticationSuccessHandler"
34+ class=" org.baeldung.security.MySimpleUrlAuthenticationSuccessHandler" />
35+
36+ <authentication-manager >
37+ <authentication-provider user-service-ref =" userDetailsService" />
38+ </authentication-manager >
39+ <beans : bean id =" userDetailsService" class =" org.baeldung.security.MyUserDetailsService" />
40+
41+ </beans : beans >
0 commit comments