}
/*
* Pass the request (this) and, if it's an HttpServletResponse, the response.
*/
if (realm.isSecurityExtensionEnabled(getServletContext())) {
realm.logout(this, (response instanceof HttpServletResponse ? (HttpServletResponse) response : null));
}
setUserPrincipal(null);
setAuthType(null);
Session session = getSessionInternal(false);