public Object down(Message msg) { GmsHeader hdr =msg.getHeader(GMS_ID); Address remoteAddress = msg.getDest(); if (needsAuthentication(hdr, remoteAddress)) { // We are a client who needs to authenticate SaslClientContext ctx = null; try { ctx = new SaslClientContext(saslClientFactory, mech, server_name != null ? server_name : remoteAddress.toString(), client_callback_handler, sasl_props, client_subject); sasl_context.put(remoteAddress, ctx); ctx.addHeader(msg, null); } catch (Exception e) { if (ctx != null) { disposeContext(remoteAddress); } throw new SecurityException(e); } } return down_prot.down(msg); }
} finally { if (ctx != null && !ctx.needsWrapping()) { disposeContext(remoteAddress);
disposeContext(remoteAddress); if (log.isWarnEnabled()) { log.warn(getAddress() + ": failed to validate CHALLENGE from " + remoteAddress + ", token", e); disposeContext(remoteAddress); if (log.isWarnEnabled()) { log.warn("failed to validate RESPONSE from " + remoteAddress + ", token", e);
public Object down(Message msg) { GmsHeader hdr =msg.getHeader(GMS_ID); Address remoteAddress = msg.getDest(); if (needsAuthentication(hdr, remoteAddress)) { // We are a client who needs to authenticate SaslClientContext ctx = null; try { ctx = new SaslClientContext(saslClientFactory, mech, server_name != null ? server_name : remoteAddress.toString(), client_callback_handler, sasl_props, client_subject); sasl_context.put(remoteAddress, ctx); ctx.addHeader(msg, null); } catch (Exception e) { if (ctx != null) { disposeContext(remoteAddress); } throw new SecurityException(e); } } return down_prot.down(msg); }
disposeContext(remoteAddress); if (log.isWarnEnabled()) { log.warn(getAddress() + ": failed to validate CHALLENGE from " + remoteAddress + ", token", e); disposeContext(remoteAddress); if (log.isWarnEnabled()) { log.warn("failed to validate RESPONSE from " + remoteAddress + ", token", e);
} finally { if (ctx != null && !ctx.needsWrapping()) { disposeContext(remoteAddress);