My Spring MVC app is not allowing any logins and I can't figure out why.
I've added logging to the Login Controller but nothing is being outputted there.
The login page just seems to automatically redirect to the error page without going through the Login Controller.
Any ideas how to debug this problem?
<http auto-config="false" access-decision-manager-ref="accessDecisionManager" use-expressions="true">
<intercept-url pattern="/login/**" access="hasRole('ROLE_ANONYMOUS')" requires-channel="${application.secureChannel}" />
<intercept-url pattern="/error/**" access="hasRole('ROLE_ANONYMOUS')" requires-channel="http" />
<intercept-url pattern="/register/**" access="hasRole('ROLE_ANONYMOUS')" requires-channel="${application.secureChannel}" />
<intercept-url pattern="/" access="hasRole('ROLE_ANONYMOUS')" requires-channel="http" />
<intercept-url pattern="/**" access="hasRole('ROLE_USER')" requires-channel="http" />
<form-login login-page="/login" login-processing-url="/login/submit" authentication-failure-url="/login/error" />
<logout logout-url="/logout" />
</http>
<authentication-manager alias="authenticationManager">
<authentication-provider user-service-ref="userDetailsService">
<password-encoder hash="sha-256" base64="true">
<salt-source user-property="salt" />
</password-encoder>
</authentication-provider>
</authentication-manager>
<beans:bean id="userDetailsService" class="com.my.UserDetailsServiceImpl">
</beans:bean>
<beans:bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.ShaPasswordEncoder">
<beans:constructor-arg value="256" />
<beans:property name="encodeHashAsBase64" value="true" />
</beans:bean>
<beans:bean id="roleHierarchy" class="org.springframework.security.access.hierarchicalroles.RoleHierarchyImpl">
<beans:property name="hierarchy">
<beans:value>
ROLE_ADMIN > ROLE_USER
ROLE_USER > ROLE_ANONYMOUS
</beans:value>
</beans:property>
</beans:bean>
<beans:bean id="accessDecisionManager" class="org.springframework.security.access.vote.AffirmativeBased">
<beans:property name="decisionVoters">
<beans:list>
<beans:bean class="org.springframework.security.web.access.expression.WebExpressionVoter">
<beans:property name="expressionHandler">
<beans:bean class="org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler">
<beans:property name="roleHierarchy" ref="roleHierarchy" />
</beans:bean>
</beans:property>
</beans:bean>
</beans:list>
</beans:property>
</beans:bean>