@Override
public Response execute(QueryState queryState)
{
try
{
SaslAuthenticator authenticator = ((ServerConnection) connection).getAuthenticator();
byte[] challenge = authenticator.evaluateResponse(token == null ? new byte[0] : token);
if (authenticator.isComplete())
{
AuthenticatedUser user = authenticator.getAuthenticatedUser();
queryState.getClientState().login(user);
// authentication is complete, send a ready message to the client
return new AuthSuccess(challenge);
}
else