You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
| Online: | 16 Members of 4546 |
| Forum: Seam Users |
10. Aug 2008, 15:05 CET | Link |
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.