- } else {
- JsrSession jsrSession = (JsrSession) session;
- String jsrId = jsrSession.getId();
- System.out.println("JSR ID: " + jsrId);
- jsrSession.getUserProperties().put(CmsSession.SESSION_LOCAL_ID, cmsSession.getLocalId());
- jsrSession.getUserProperties().put(CmsSession.SESSION_UUID, cmsSession.getUuid());
- jsrSession.getUserProperties().put(HttpContext.REMOTE_USER, cmsSession.getUserDn());
- // httpSession.setAttribute(HttpContext.AUTHORIZATION,
- // cmsSession.getAuthorization());
- }
- }
-
- @Override
- public void onSessionClosed(WebSocketSession session) {
- // TODO Auto-generated method stub
-
- }
- });
+// }
+//
+// if (httpSessionId == null) {
+// HttpSession httpSession = (HttpSession) upgradeRequest.getSession();
+// if (httpSession == null) {
+//// session.disconnect();
+//// return;
+// } else {
+// httpSessionId = httpSession.getId();
+// System.out.println("Upgrade request session ID : " + httpSession.getId());
+// }
+// }
+//
+// if (httpSessionId != null) {
+// int dotIdx = httpSessionId.lastIndexOf('.');
+// if (dotIdx > 0) {
+// httpSessionId = httpSessionId.substring(0, dotIdx);
+// }
+// }
+//
+// CmsSession cmsSession = getCmsSession(httpSessionId);
+// if (cmsSession == null) {
+//// session.disconnect();
+//// return;
+//
+//// try {
+//// session.getUpgradeResponse().sendForbidden("Web Sockets must always be authenticated.");
+//// } catch (IOException e) {
+//// e.printStackTrace();
+//// }
+// } else {
+// JsrSession jsrSession = (JsrSession) session;
+// String jsrId = jsrSession.getId();
+// System.out.println("JSR ID: " + jsrId);
+// jsrSession.getUserProperties().put(CmsSession.SESSION_LOCAL_ID, cmsSession.getLocalId());
+// jsrSession.getUserProperties().put(CmsSession.SESSION_UUID, cmsSession.getUuid());
+// jsrSession.getUserProperties().put(HttpContext.REMOTE_USER, cmsSession.getUserDn());
+// // httpSession.setAttribute(HttpContext.AUTHORIZATION,
+// // cmsSession.getAuthorization());
+// }
+// }
+//
+// @Override
+// public void onSessionClosed(WebSocketSession session) {
+// // TODO Auto-generated method stub
+//
+// }
+// });