What should I use to do some post-authentication things (like loading user-preferences)
I tried to add an interceptor on both loginSuccessful and postAuthenticate.
Only on postAuthenticate the interceptor works.
Seam 2.0.2.
Interceptor class:
@Name(value = "preferenceController")
public class PreferenceController {
@In
Identity identity;
@In(create = true)
private EntityManager entityManager;
@In(value = "user")
private User user;
@Observer("org.jboss.seam.security.loginSuccessful")
public void doe()
{
System.out.println("This will not be shown");
}
@Observer("org.jboss.seam.postAuthenticate")
public void getPreferences() {
System.out.println("This is shown");
}
}Thank you for advice.