net.spy.memcached.protocol.binary.SASLAuthOperationImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spymemcached Show documentation
Show all versions of spymemcached Show documentation
A simple, asynchronous, single-threaded Memcached client written in java.
The newest version!
package net.spy.memcached.protocol.binary;
import java.util.Map;
import javax.security.auth.callback.CallbackHandler;
import javax.security.sasl.SaslClient;
import javax.security.sasl.SaslException;
import net.spy.memcached.ops.OperationCallback;
import net.spy.memcached.ops.SASLAuthOperation;
public class SASLAuthOperationImpl extends SASLBaseOperationImpl
implements SASLAuthOperation {
private final static int CMD = 0x21;
public SASLAuthOperationImpl(String[] m, String s,
Map p, CallbackHandler h, OperationCallback c) {
super(CMD, m, EMPTY_BYTES, s, p, h, c);
}
@Override
protected byte[] buildResponse(SaslClient sc) throws SaslException {
return sc.hasInitialResponse() ?
sc.evaluateChallenge(challenge)
: EMPTY_BYTES;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy