[Security 3.1.2] After logout, first attempt login forward to login page
Hi everybody,
i start to use Spring security recently.
All works fine except one thing. Login after a logout.
If i try to login after a logout, i'm directly forward to the login page, instead of my home page.
At the second attempt it work like attended.
I check in debug mode if something go wrong, but as far i can see, all work perfectly. My UserDetailsService get the right user and GrantedAuthority.
So the issue seems to come from the forwarding.
I suspect it come from the DelegationActionProxy for struts, the login success forward to a Struts Action.
I will check this way but in the same time i'll be gratefull if someone can check my spring security context file to let me know if something is wrong.
Code:
<http use-expressions="true" auto-config="true">
<form-login login-page='/login.jsp'
login-processing-url='/j_spring_security_check'
authentication-failure-url="/login_error.jsp"
default-target-url='/home.do'/>
<intercept-url pattern="/images/**" access="permitAll" />
<intercept-url pattern="/javascripts/**" access="permitAll" />
<intercept-url pattern="/stylesheets/**" access="permitAll" />
<intercept-url pattern="/login.jsp*" access="permitAll" />
<intercept-url pattern="/login_error.jsp" access="permitAll" />
<intercept-url pattern="/register.jsp*" access="permitAll" />
<intercept-url pattern="/register_success.jsp*" access="permitAll" />
<intercept-url pattern="/register.do*" access="permitAll" />
<intercept-url pattern="/logout" access="permitAll"/>
<intercept-url pattern="/**" access="isFullyAuthenticated()" />
<logout invalidate-session="true" logout-success-url="/"
logout-url="/logout"/>
</http>
<authentication-manager>
<authentication-provider user-service-ref="myUserDetailsService"/>
</authentication-manager>
<beans:bean id ="myUserDetailsService" class="com.coff.front.mod.safec2c.security.UserDetailsServiceImpl">
<beans:property name="h2Dao" ref="H2DaoBean"/>
</beans:bean>
Thanks for your help
Regards
Iskadar