Announcement Announcement Module
Collapse
No announcement yet.
Remember Me redirection Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Remember Me redirection

    Hello,

    I'm struggling with this remember me cookie. Debugging it seems that there aren't any problems, the haskey is verified.

    But when I retype my url why do I see the login form again? I don't know what I'm missing..

    Here is my configuration

    Code:
     
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
            xmlns:p="http://www.springframework.org/schema/p"
            xmlns:security="http://www.springframework.org/schema/security"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.springframework.org/schema/beans
                                http://www.springframework.org/schema/beans/spring-beans.xsd
                                http://www.springframework.org/schema/security
                                http://www.springframework.org/schema/security/spring-security.xsd">
    
        <bean id="authenticationSuccessHandler" class="com.peppe.springsecurity.MlbAuthenticationSuccessHandler"/>
    
        <bean id="myUserDetailsService" class="com.peppe.springsecurity.MyUserDetailsService"/>
    
        <bean id="rememberMeServices" class="com.peppe.springsecurity.MlbRememberMeService">
            <property name="userDetailsService" ref="myUserDetailsService"/>
            <property name="key" value="a23eef6dfd1514cb885f47070380ff18"/>
            <property name="tokenValiditySeconds" value="1209600"/>
        </bean>
    
        <security:global-method-security pre-post-annotations="enabled" />
    
        <security:http auto-config="false" >
            <security:intercept-url pattern="/adminpage.htm" access="ROLE_ADMIN" />
            <security:remember-me services-ref="rememberMeServices" />
            <security:form-login login-page="/welcome.htm" authentication-success-handler-ref="authenticationSuccessHandler" authentication-failure-url="/welcome.htm?login_error=true" />
            <security:session-management invalid-session-url="/welcome.htm"/>
            <security:logout invalidate-session="true" logout-success-url="/welcome.htm"/>
        </security:http>
    
        <security:authentication-manager>
            <security:authentication-provider user-service-ref="myUserDetailsService"/>
        </security:authentication-manager>
    
    </beans>
    I created an AuthenticationSuccessHandler for the login .. I've just seen that in Spring 3.1.0 there is the possibility to set an authenticationHandler.. Is that resolve my problem?
    Anyway with Spring 3.0.5, that I'm using, which is the next page to be redirected?

    I don't know.. I feel like I'm missing a basic thing and I don't know what..

    Thanks for any help..

  • #2
    What URL are you requesting?

    Please check the debug log information and post any relevant information, with a description of what browser requests were made, whether the remember-me cookie was present etc.

    Comment

    Working...
    X