appendOption(connectString, Options.OPTION_LANG, Nats.CLIENT_LANGUAGE, true, false); appendOption(connectString, Options.OPTION_VERSION, Nats.CLIENT_VERSION, true, true); appendOption(connectString, Options.OPTION_NAME, this.connectionName, true, true); appendOption(connectString, Options.OPTION_PROTOCOL, "1", false, true); appendOption(connectString, Options.OPTION_VERBOSE, String.valueOf(this.isVerbose()), false, true); appendOption(connectString, Options.OPTION_PEDANTIC, String.valueOf(this.isPedantic()), false, true); appendOption(connectString, Options.OPTION_TLS_REQUIRED, String.valueOf(this.isTLSRequired()), false, true); appendOption(connectString, Options.OPTION_ECHO, String.valueOf(!this.isNoEcho()), false, true); appendOption(connectString, Options.OPTION_NKEY, new String(nkey), true, true); // public key to string is ok appendOption(connectString, Options.OPTION_SIG, encodedSig, true, true); appendOption(connectString, Options.OPTION_JWT, new String(jwt), true, true); // public JWT to string is ok } else if (includeAuth) { String uriUser = null; appendOption(connectString, Options.OPTION_USER, uriUser, true, true); } else if (this.username != null) { appendOption(connectString, Options.OPTION_USER, this.username, true, true); appendOption(connectString, Options.OPTION_PASSWORD, uriPass, true, true); } else if (this.password != null) { appendOption(connectString, Options.OPTION_PASSWORD, this.password, true, true); appendOption(connectString, Options.OPTION_AUTH_TOKEN, uriToken, true, true); } else if (this.token != null) { appendOption(connectString, Options.OPTION_AUTH_TOKEN, this.token, true, true);
appendOption(connectString, Options.OPTION_LANG, Nats.CLIENT_LANGUAGE, true, false); appendOption(connectString, Options.OPTION_VERSION, Nats.CLIENT_VERSION, true, true); appendOption(connectString, Options.OPTION_NAME, this.connectionName, true, true); appendOption(connectString, Options.OPTION_PROTOCOL, "1", false, true); appendOption(connectString, Options.OPTION_VERBOSE, String.valueOf(this.isVerbose()), false, true); appendOption(connectString, Options.OPTION_PEDANTIC, String.valueOf(this.isPedantic()), false, true); appendOption(connectString, Options.OPTION_TLS_REQUIRED, String.valueOf(this.isTLSRequired()), false, true); appendOption(connectString, Options.OPTION_ECHO, String.valueOf(!this.isNoEcho()), false, true); appendOption(connectString, Options.OPTION_NKEY, new String(nkey), true, true); // public key to string is ok appendOption(connectString, Options.OPTION_SIG, encodedSig, true, true); appendOption(connectString, Options.OPTION_JWT, new String(jwt), true, true); // public JWT to string is ok } else if (includeAuth) { String uriUser = null; appendOption(connectString, Options.OPTION_USER, uriUser, true, true); } else if (this.username != null) { appendOption(connectString, Options.OPTION_USER, this.username, true, true); appendOption(connectString, Options.OPTION_PASSWORD, uriPass, true, true); } else if (this.password != null) { appendOption(connectString, Options.OPTION_PASSWORD, this.password, true, true); appendOption(connectString, Options.OPTION_AUTH_TOKEN, uriToken, true, true); } else if (this.token != null) { appendOption(connectString, Options.OPTION_AUTH_TOKEN, this.token, true, true);