code: private void checkIsAuthed(final ChannelHandlerContext ctx, final ResponseStatus status) {
      if (status.isSuccess()) {
        LOGGER.debug("Successfully authenticated against node {}", ctx.channel().remoteAddress());
        ctx.pipeline().remove(this);
        originalPromise().setSuccess();
        ctx.fireChannelActive();
  
      } else if (status == AUTH_ERROR) {
        originalPromise().setFailure(new AuthenticationException("SASL Authentication Failure"));
  
      } else {
        originalPromise().setFailure(new AuthenticationException("Unhandled SASL auth status: " + status));
      }
    }
docs: Check if the authentication process succeeded or failed based on the response status.