This content has been marked as final.
Show 3 replies
-
1. Re: User Name in loggedOut Event
shane.bryzak Nov 12, 2008 4:17 PM (in response to michaeltr)Session invalidation doesn't actually occur until the end of the request, the actual reason why the username is null is because the principal and credentials are cleared by the call to Identity.unAuthenticate(). The easiest workaround that I can think of off the top of my head is to write another observer for org.jboss.seam.security.postAuthenticate which copies the username to another variable in session scope, then you can read that value during the loggedOut event instead.
-
2. Re: User Name in loggedOut Event
michaeltr Nov 12, 2008 5:03 PM (in response to michaeltr)Thanks for your answer. That was my first idea too, but I thought there might be a more elegant solution.
Michael
-
3. Re: User Name in loggedOut Event
wachtda.scsi.gmx.ch Feb 27, 2009 12:46 PM (in response to michaeltr)Wouldn't it be more elegant to write a own logout method, which calls manually the identity.logout()?
For example:
View -> #{authenticator.myLogout()}
@In
Identity identity;
public void myLogout() {
// do some stuff with the user
// call the logout
identity.logout();
}