Java Reference
In-Depth Information
secure and can be viewed without verifying user's identity with the application. ANPF can
be configured as shown in Listing 6-13.
Listing 6-13. applicationContext-security.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
" http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!—Other beans -->
<bean id="anonymousProcessingFilter" class="org.springframework å
.security.providers.anonymous.AnonymousProcessingFilter">
<property name="key" value="changeThis"/>
<property name="userAttribute" value="anonymousUser,ROLE_ANONYMOUS"/>
</bean>
</beans>
Exception Translation Filter (ETF)
ETF handles any exception raised during authentication or authorization. It is configured
in the application context as shown in Listing 6-14.
Listing 6-14. applicationContext-security.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
" http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!—Other beans -->
<bean id="exceptionTranslationFilter"
class="org.springframework.security.ui.ExceptionTranslationFilter">
<property name="authenticationEntryPoint" ref="authenticationEntryPoint" />
<property name="accessDeniedHandler" ref="accessDeniedHandler" />
 
Search WWH ::




Custom Search