Announcement Announcement Module
Collapse
No announcement yet.
Same SuccessHandler for form and rememberMe Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Same SuccessHandler for form and rememberMe

    Hi!

    I just added a remember me option for my application, but I've seen that it doesn't invoke my SuccessHandler after doing the login, and in that method is where I set all the info I need in the users session. Is there any way to invoke the SuccessHandler or I need to do it some other way?

    My config is:

    Code:
    <sec:http auto-config="true" use-expressions="true" entry-point-ref="customAuthenticationEntryPoint">
            ...        
            <sec:form-login
                authentication-success-handler-ref="successHandler"
                authentication-failure-handler-ref="failureHandler"
                login-processing-url="/login"/>
            ...
    </sec:http>
    
    <bean id="rememberMeFilter" class="org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter">
            <property name="rememberMeServices" ref="rememberMeServices"/>
            <property name="authenticationManager" ref="authManager" />
    </bean>
    
    <bean id="rememberMeServices" class="org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices">
            <property name="userDetailsService" ref="userDetailsService"/>
            <property name="key" value="string"/>
    </bean>
    
        <bean id="rememberMeAuthenticationProvider" class="org.springframework.security.authentication.RememberMeAuthenticationProvider">
            <property name="key" value="string"/>
    </bean>
Working...
X