Advertisement
Guest User

Untitled

a guest
Dec 19th, 2011
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.17 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans:beans xmlns="http://www.springframework.org/schema/security"
  3.     xmlns:beans="http://www.springframework.org/schema/beans"
  4.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5.     xsi:schemaLocation="http://www.springframework.org/schema/beans
  6.     http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  7.     http://www.springframework.org/schema/security
  8.     http://www.springframework.org/schema/security/spring-security-3.0.3.xsd">
  9.  
  10.     <beans:import resource="/hibernate-config.xml"/>
  11.     <beans:import resource="/spring-config.xml"/>
  12.  
  13.     <http auto-config="true">
  14.         <intercept-url pattern="/admin/**" access="ROLE_ADMIN" />
  15.         <intercept-url pattern="/user/**" access="ROLE_USER,ROLE_ADMIN" />
  16.         <form-login login-page='/login' authentication-failure-url="/login?login_error=1" default-target-url="/" />
  17.     </http>
  18.  
  19.     <authentication-manager>
  20.         <authentication-provider user-service-ref="customUserDetailsService">
  21.             <password-encoder hash="sha-256" />
  22.         </authentication-provider>
  23.     </authentication-manager>
  24.    
  25.     <beans:bean id="customUserDetailsService" class="lt.database.service.CustomUserLoginService"/>
  26. </beans:beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement