public SASLBaseOperationImpl(byte c, String[] m, byte[] ch, String s, Map<String, ?> p, CallbackHandler h, OperationCallback cb) { super(c, generateOpaque(), cb); mech = m; challenge = ch; serverName = s; props = p; cbh = h; }
@Override protected void finishedPayload(byte[] pl) throws IOException { if (errorCode == SASL_CONTINUE) { getCallback().receivedStatus(new OperationStatus(true, new String(pl))); transitionState(OperationState.COMPLETE); } else if(errorCode == 0) { getCallback().receivedStatus(new OperationStatus(true, "")); transitionState(OperationState.COMPLETE); } else { super.finishedPayload(pl); } }
@Override public void initialize() { try { SaslClient sc = Sasl.createSaslClient(mech, null, "memcached", serverName, props, cbh); byte[] response = buildResponse(sc); String mechanism = sc.getMechanismName(); getLogger().debug("Using SASL auth mechanism: " + mechanism); prepareBuffer(mechanism, 0, response); } catch (SaslException e) { // XXX: Probably something saner can be done here. throw new RuntimeException("Can't make SASL go.", e); } }
@Override public void initialize() { try { SaslClient sc = Sasl.createSaslClient(mech, null, "memcached", serverName, props, cbh); byte[] response = buildResponse(sc); String mechanism = sc.getMechanismName(); prepareBuffer(mechanism, 0, response); } catch (SaslException e) { // XXX: Probably something saner can be done here. throw new RuntimeException("Can't make SASL go.", e); } }
@Override protected void decodePayload(byte[] pl) { getLogger().debug("Auth response: %s", new String(pl)); }
@Override protected void finishedPayload(byte[] pl) throws IOException { if (errorCode == SASL_CONTINUE) { getCallback().receivedStatus(new OperationStatus(true, new String(pl))); transitionState(OperationState.COMPLETE); } else if (errorCode == 0) { getCallback().receivedStatus(new OperationStatus(true, "")); transitionState(OperationState.COMPLETE); } else { super.finishedPayload(pl); } }
@Override public void initialize() { try { SaslClient sc = Sasl.createSaslClient(mech, null, "memcached", serverName, props, cbh); byte[] response = buildResponse(sc); String mechanism = sc.getMechanismName(); getLogger().debug("Using SASL auth mechanism: " + mechanism); prepareBuffer(mechanism, 0, response); } catch (SaslException e) { // XXX: Probably something saner can be done here. throw new RuntimeException("Can't make SASL go.", e); } }
@Override public void initialize() { try { SaslClient sc=Sasl.createSaslClient(mech, null, "memcached", serverName, props, cbh); byte[] response = buildResponse(sc); String mechanism = sc.getMechanismName(); prepareBuffer(mechanism, 0, response); } catch(SaslException e) { // XXX: Probably something saner can be done here. throw new RuntimeException("Can't make SASL go.", e); } }
@Override protected void decodePayload(byte[] pl) { getLogger().debug("Auth response: %s", new String(pl)); }
@Override protected void finishedPayload(byte[] pl) throws IOException { if (errorCode == SASL_CONTINUE) { getCallback().receivedStatus(new OperationStatus(true, new String(pl), StatusCode.SUCCESS)); transitionState(OperationState.COMPLETE); } else if (errorCode == 0) { getCallback().receivedStatus(new OperationStatus(true, "", StatusCode.SUCCESS)); transitionState(OperationState.COMPLETE); } else { super.finishedPayload(pl); } }
@Override public void initialize() { try { SaslClient sc = Sasl.createSaslClient(mech, null, "memcached", serverName, props, cbh); byte[] response = buildResponse(sc); String mechanism = sc.getMechanismName(); prepareBuffer(mechanism, 0, response); } catch (SaslException e) { // XXX: Probably something saner can be done here. throw new RuntimeException("Can't make SASL go.", e); } }
public SASLBaseOperationImpl(byte c, String[] m, byte[] ch, String s, Map<String, ?> p, CallbackHandler h, OperationCallback cb) { super(c, generateOpaque(), cb); mech = m; challenge = ch; serverName = s; props = p; cbh = h; }
@Override protected void decodePayload(byte[] pl) { getLogger().debug("Auth response: %s", new String(pl)); }
@Override protected void finishedPayload(byte[] pl) throws IOException { if (errorCode == SASL_CONTINUE) { getCallback().receivedStatus(new OperationStatus(true, new String(pl))); transitionState(OperationState.COMPLETE); } else if (errorCode == 0) { getCallback().receivedStatus(new OperationStatus(true, "")); transitionState(OperationState.COMPLETE); } else { super.finishedPayload(pl); } }
public SASLBaseOperationImpl(int c, String[] m, byte[] ch, String s, Map<String, ?> p, CallbackHandler h, OperationCallback cb) { super(c, generateOpaque(), cb); mech = m; challenge = ch; serverName = s; props = p; cbh = h; }
@Override protected void decodePayload(byte[] pl) { getLogger().debug("Auth response: %s", new String(pl)); }
@Override protected void finishedPayload(byte[] pl) throws IOException { if (errorCode == SASL_CONTINUE) { getCallback().receivedStatus(new OperationStatus(true, new String(pl), StatusCode.SUCCESS)); transitionState(OperationState.COMPLETE); } else if (errorCode == 0) { getCallback().receivedStatus(new OperationStatus(true, "", StatusCode.SUCCESS)); transitionState(OperationState.COMPLETE); } else { super.finishedPayload(pl); } }
public SASLBaseOperationImpl(byte c, String[] m, byte[] ch, String s, Map<String, ?> p, CallbackHandler h, OperationCallback cb) { super(c, generateOpaque(), cb); mech = m; challenge = ch; serverName = s; props = p; cbh = h; }
@Override protected void decodePayload(byte[] pl) { getLogger().debug("Auth response: %s", new String(pl)); }
public SASLBaseOperationImpl(int c, String[] m, byte[] ch, String s, Map<String, ?> p, CallbackHandler h, OperationCallback cb) { super(c, generateOpaque(), cb); mech = m; challenge = ch; serverName = s; props = p; cbh = h; }