/** * @param nodeId Node ID. * @param msg Message. */ private void onAuthenticateRequestMessage(UUID nodeId, UserAuthenticateRequestMessage msg) { UserAuthenticateResponseMessage respMsg; try { User u = authenticateOnServer(msg.name(), msg.password()); respMsg = new UserAuthenticateResponseMessage(msg.id(), null); } catch (IgniteCheckedException e) { respMsg = new UserAuthenticateResponseMessage(msg.id(), e.toString()); e.printStackTrace(); } try { ctx.io().sendToGridTopic(nodeId, GridTopic.TOPIC_AUTH, respMsg, GridIoPolicy.SYSTEM_POOL); } catch (IgniteCheckedException e) { U.error(log, "Unexpected exception on send UserAuthenticateResponseMessage.", e); } }
return new AuthorizationContext(authenticateOnServer(login, passwd));
/** * @param nodeId Node ID. * @param msg Message. */ private void onAuthenticateRequestMessage(UUID nodeId, UserAuthenticateRequestMessage msg) { UserAuthenticateResponseMessage respMsg; try { User u = authenticateOnServer(msg.name(), msg.password()); respMsg = new UserAuthenticateResponseMessage(msg.id(), null); } catch (IgniteCheckedException e) { respMsg = new UserAuthenticateResponseMessage(msg.id(), e.toString()); e.printStackTrace(); } try { ctx.io().sendToGridTopic(nodeId, GridTopic.TOPIC_AUTH, respMsg, GridIoPolicy.SYSTEM_POOL); } catch (IgniteCheckedException e) { U.error(log, "Unexpected exception on send UserAuthenticateResponseMessage.", e); } }
return new AuthorizationContext(authenticateOnServer(login, passwd));