1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
<security:http >
<security:form-login login-page="/Authentification.htm" authentication-failure-url="/accessDenied.htm?login_error=true" />
<security:intercept-url pattern="/acceuil.htm" access="ROLE_ADMIN,ROLE_USER" />
<security:intercept-url pattern="/employees/list.htm" access="ROLE_ADMIN" />
</security:http>
<security:authentication-provider>
<security:password-encoder hash="md5" >
<security:salt-source system-wide="MySalt"/>
</security:password-encoder>
<security:jdbc-user-service data-source-ref="dataSource"
authorities-by-username-query="select username, authority from employees where username =?"
users-by-username-query="select username, password, enabled from employees where username =?"/>
</security:authentication-provider>
<security:global-method-security secured-annotations="enabled">
<security:protect-pointcut
expression="execution(* com.springsource..*Service.*(..))"
access="ROLE_USER" />
</security:global-method-security> |
Partager