I currently log users in programmatically (like when they login through Facebook or other means than using my login form) with:
What I want to do instead is log the user in as if they set the remember-me option on in the login form. So I'm guessing I need to use the RememberMeAuthenticationToken instead of the UsernamePasswordAuthenticationToken? But what do I put for the `key` argument of the constructor?
new UsernamePasswordAuthenticationToken(user, "", authorities)
RememberMeAuthenticationToken(String key, Object principal, Collection<? extends GrantedAuthority> authorities)