I am using Swarm with Acegi integration. Authentication and
authorization work fine, but I am having trouble logging out. I use a
link to a Logout class that implements the following code to log the
user out.
public class LoggedOutPage extends SecureWebPage {
private static final long
You have to realize that both swarm and acegi keep a copy of the
logged in user. So you have to logoff at 2 places.
You could use a logoff page but imo it would be better to do the
logging off in the link itself. Something like:
Link logoff = new Link(logoff)
{
Thanks for the quick reply. In the code, do I need to keep around my
original LoginContext and return it with getLogoffContext() call or does
it not matter what Login Context I send to logoff? If so, is the current
LogonContext saved somewhere in wicket already?
Thanks, David
Maurice Marrink
You do not need to return the same instance but you do need to return
an instance of the same class. Swarm does not keep your original
logincontext anywhere, rather it keeps some sort of hash around.
logging off with a new instance of the same class will produce the
same hash. For that purpose