use of org.apache.qpid.server.management.plugin.HttpRequestInteractiveAuthenticator.LogoutHandler in project qpid-broker-j by apache.
the class LogoutServlet method doGet.
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException {
HttpSession session = request.getSession(false);
if (session != null) {
// Invalidating the session will cause LoginLogoutReporter to log the user logoff.
session.invalidate();
}
LogoutHandler logoutHandler = null;
for (HttpRequestInteractiveAuthenticator authenticator : AUTHENTICATORS) {
logoutHandler = authenticator.getLogoutHandler(request, _managementConfiguration);
if (logoutHandler != null) {
break;
}
}
if (logoutHandler != null) {
logoutHandler.handleLogout(resp);
} else {
resp.sendRedirect(HttpManagement.DEFAULT_LOGOUT_URL);
}
}
Aggregations