problem with overriding autologin in spring framework?

Posted by sword101 on Stack Overflow See other posts from Stack Overflow or by sword101
Published on 2010-04-02T10:38:41Z Indexed on 2010/04/02 10:43 UTC
Read the original article Hit count: 401

Filed under:

greetings everybody iam using spring 3 remember me service as follows

<http>
<remember-me/>
....</http>

and i want to perform some logic in the autologin so i tried to override the AbstractRememberMeServices as follows:

package com.foo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.RememberMeServices;


public abstract class AbstractRememberMeServices implements RememberMeServices{

 @Override
 public Authentication autoLogin(HttpServletRequest arg0,
   HttpServletResponse arg1) {
  System.out.println("Auto Login");
  return null;
 }

 @Override
 public void loginSuccess(HttpServletRequest arg0, HttpServletResponse arg1,
   Authentication arg2) {
  System.out.println("Login Success");

 }

}

but the autologin occurs with no action,the user auto login but the print statement is not printed? what's wrong?

© Stack Overflow or respective owner

Related posts about remember-me