protected boolean connect(@RequestParam(value = "s") String sessionId, HttpServletResponse response) throws IOException { if (!authentication.begin(sessionId)) { response.sendError(HttpServletResponse.SC_UNAUTHORIZED); return false; } return true; }
protected void doLogout(String sessionUUID, HttpServletResponse response) throws IOException, JSONException { try { if (authentication.begin(sessionUUID)) { AuthenticationService authenticationService = AppBeans.get(AuthenticationService.NAME); authenticationService.logout(); } } catch (Throwable e) { log.error("Error processing logout request", e); response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } } }
HttpServletRequest request, HttpServletResponse response) throws IOException { if (!authentication.begin(sessionId)) { response.sendError(HttpServletResponse.SC_UNAUTHORIZED); return;