I have a (Java) web application which uses the Audience Manager ADF cartridge. This works fine by (as documented) setting the taf:claim:audiencemanager:contact:id
session attribute on login, and I see my contact details populated in the ADF. I have implemented a logout, where I clear this session attribute:
request.getSession().removeAttribute("taf:claim:audiencemanager:contact:id");
However on subsequent requests I still see the ADF populated with the previously logged in user's details.
How can I ensure that these are no longer added after the user has logged out?
If I log in with another user, the ADF is populated with the new user's details, so it does seem possible to clear the ADF state, however simply doing this:
request.getSession().setAttribute("taf:claim:audiencemanager:contact:id","");
Does not work either.
UPDATE: the only way I found yet to do it is to call
request.getSession().invalidate()
Which seems a bit heavy handed, but will do for now - I would still be interested in alternatives which did not reset the session...