I'm having trouble to logout of jboss.
Got authentication working quit easily.
When I try and access a secure servlet, I get asked for a user name and password, and it logs in fine.
I call my logout servlet which also works fine, but when I call the secure servlet again I expected to be asked for a user name and password, but it doesn't.
I have to restart the browser before It asks me again for a user name and password.
Here is my logout servet source:
public class LogoutServlet extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
request.getSession().invalidate();
SecurityAssociation.clear();
}
}
Found the answer, had to set flushOnSessionInvalidation="true"
<security-domain flushOnSessionInvalidation="true">java:/jaas/my-policy</security-domain>