marcoswp3x 14 de set. de 2007
O problema estava na configuração do applicationContext.
Segue o configurado corretamente:
& lt ? xml version = "1.0" encoding = "UTF-8" ?& gt
& lt ;! DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd" & gt ;
& lt ; beans & gt ;
& lt ; bean id = "filterChainProxy" class = "org.acegisecurity.util.FilterChainProxy" & gt ;
& lt ; property name = "filterInvocationDefinitionSource" & gt ;
& lt ; value & gt ;
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT
/**= httpSessionIntegrationFilter , authenticationProcessingFilter , anonymousProcessingFilter , exceptionTranslationFilter , filterInvocationInterceptor
& lt ;/ value & gt ;
& lt ;/ property & gt ;
& lt ;/ bean & gt ;
& lt ; bean id = "filterInvocationInterceptor"
class = "org.acegisecurity.intercept.web.FilterSecurityInterceptor" & gt ;
& lt ; property name = "authenticationManager" & gt ;
& lt ; ref bean = "authenticationManager" /& gt ;
& lt ;/ property & gt ;
& lt ; property name = "accessDecisionManager" & gt ;
& lt ; ref bean = "accessDecisionManager" /& gt ;
& lt ;/ property & gt ;
& lt ; property name = "objectDefinitionSource" & gt ;
& lt ; value & gt ;
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT
/ resources / auth . gsp = ROLE_ANONYMOUS
/**= ROLE_ADMIN
& lt ;/ value & gt ;
& lt ;/ property & gt ;
& lt ;/ bean & gt ;
& lt ; bean id = "authenticationProcessingFilter"
class = "org.acegisecurity.ui.webapp.AuthenticationProcessingFilter" & gt ;
& lt ; property name = "authenticationManager" & gt ;
& lt ; ref bean = "authenticationManager" /& gt ;
& lt ;/ property & gt ;
& lt ; property name = "authenticationFailureUrl" & gt ;
& lt ; value & gt ;/ resources / auth . gsp ? login_error = 1 & lt ;/ value & gt ;
& lt ;/ property & gt ;
& lt ; property name = "defaultTargetUrl" & gt ;
& lt ; value & gt ;/& lt ;/ value & gt ;
& lt ;/ property & gt ;
& lt ; property name = "filterProcessesUrl" & gt ;
& lt ; value & gt ;/ j_acegi_security_check & lt ;/ value & gt ;
& lt ;/ property & gt ;
& lt ;/ bean & gt ;
& lt ; bean id = "authenticationManager" class = "org.acegisecurity.providers.ProviderManager" & gt ;
& lt ; property name = "providers" & gt ;
& lt ; list & gt ;
& lt ; ref local = "daoAuthenticationProvider" /& gt ;
& lt ; ref local = "anonymousAuthenticationProvider" /& gt ;
& lt ;/ list & gt ;
& lt ;/ property & gt ;
& lt ;/ bean & gt ;
& lt ; bean id = "concurrentSessionController"
class = "org.acegisecurity.concurrent.ConcurrentSessionControllerImpl" & gt ;
& lt ; property name = "maximumSessions" & gt ;
& lt ; value & gt ; 1 & lt ;/ value & gt ;
& lt ;/ property & gt ;
& lt ; property name = "sessionRegistry" & gt ;
& lt ; ref local = "sessionRegistry" /& gt ;
& lt ;/ property & gt ;
& lt ;/ bean & gt ;
& lt ; bean id = "sessionRegistry" class = "org.acegisecurity.concurrent.SessionRegistryImpl" /& gt ;
& lt ; bean id = "exceptionTranslationFilter" class = "org.acegisecurity.ui.ExceptionTranslationFilter" & gt ;
& lt ; property name = "authenticationEntryPoint" & gt ;
& lt ; ref local = "authenticationProcessingFilterEntryPoint" /& gt ;
& lt ;/ property & gt ;
& lt ; property name = "accessDeniedHandler" & gt ;
& lt ; bean class = "org.acegisecurity.ui.AccessDeniedHandlerImpl" & gt ;
& lt ; property name = "errorPage" value = "/accessDenied.jsp" /& gt ;
& lt ;/ bean & gt ;
& lt ;/ property & gt ;
& lt ;/ bean & gt ;
& lt ; bean id = "authenticationProcessingFilterEntryPoint"
class = "org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint" & gt ;
& lt ; property name = "loginFormUrl" & gt ;
& lt ; value & gt ;/ resources / auth . gsp & lt ;/ value & gt ;
& lt ;/ property & gt ;
& lt ; property name = "forceHttps" & gt ;
& lt ; value & gt ; false & lt ;/ value & gt ;
& lt ;/ property & gt ;
& lt ;/ bean & gt ;
& lt ; bean id = "daoAuthenticationProvider"
class = "org.acegisecurity.providers.dao.DaoAuthenticationProvider" & gt ;
& lt ; property name = "userDetailsService" & gt ;
& lt ; ref bean = "inMemoryDaoImpl" /& gt ;
& lt ;/ property & gt ;
& lt ;! -- & lt ; property name = "saltSource" & gt ;& lt ; ref bean = "saltSource" /& gt ;& lt ;/ property & gt ; -- & gt ;
& lt ;! -- & lt ; property name = "passwordEncoder" & gt ;
& lt ; ref bean = "passwordEncoder" /& gt ;
& lt ;/ property & gt ; -- & gt ;
& lt ;/ bean & gt ;
& lt ;! -- & lt ; bean id = "passwordEncoder" class = "org.acegisecurity.providers.encoding.Md5PasswordEncoder" /& gt ; -- & gt ;
& lt ; bean id = "inMemoryDaoImpl" class = "org.acegisecurity.userdetails.memory.InMemoryDaoImpl" & gt ;
& lt ; property name = "userMap" & gt ;
& lt ; value & gt ;
admin = password , ROLE_ADMIN
a = a , ROLE_ADMIN
marissa = koala , ROLE_TELLER , ROLE_SUPERVISOR
dianne = emu , ROLE_TELLER
scott = wombat , ROLE_TELLER
peter = opal , disabled , ROLE_TELLER
& lt ;/ value & gt ;
& lt ;/ property & gt ;
& lt ;/ bean & gt ;
& lt ; bean id = "httpSessionIntegrationFilter"
class = "org.acegisecurity.context.HttpSessionContextIntegrationFilter" & gt ;
& lt ; property name = "context" & gt ;
& lt ; value & gt ; org . acegisecurity . context . SecurityContextImpl & lt ;/ value & gt ;
& lt ;/ property & gt ;
& lt ;/ bean & gt ;
& lt ; bean id = "accessDecisionManager" class = "org.acegisecurity.vote.UnanimousBased" & gt ;
& lt ; property name = "allowIfAllAbstainDecisions" & gt ;
& lt ; value & gt ; false & lt ;/ value & gt ;
& lt ;/ property & gt ;
& lt ; property name = "decisionVoters" & gt ;
& lt ; list & gt ;
& lt ; ref local = "roleVoter" /& gt ;
& lt ;/ list & gt ;
& lt ;/ property & gt ;
& lt ;/ bean & gt ;
& lt ; bean id = "roleVoter" class = "org.acegisecurity.vote.RoleVoter" /& gt ;
& lt ; bean id = "anonymousProcessingFilter" class = "org.acegisecurity.providers.anonymous.AnonymousProcessingFilter" & gt ;
& lt ; property name = "key" & gt ;& lt ; value & gt ; foobar & lt ;/ value & gt ;& lt ;/ property & gt ;
& lt ; property name = "userAttribute" & gt ;& lt ; value & gt ; anonymousUser , ROLE_ANONYMOUS & lt ;/ value & gt ;& lt ;/ property & gt ;
& lt ;/ bean & gt ;
& lt ; bean id = "anonymousAuthenticationProvider" class = "org.acegisecurity.providers.anonymous.AnonymousAuthenticationProvider" & gt ;
& lt ; property name = "key" & gt ;& lt ; value & gt ; foobar & lt ;/ value & gt ;& lt ;/ property & gt ;
& lt ;/ bean & gt ;
& lt ;/ beans & gt ;
marcoswp3x 17 de set. de 2007