bencebalogh / avro-schema-registry

Confluent Schema Registry implementation in javascript to easily serialize and deserialize kafka messages
MIT License
28 stars 30 forks source link

Using AUTH in url is unfriendly #29

Closed han8909227 closed 4 years ago

han8909227 commented 4 years ago

The current method of passing in any auth would be through the registry url string, which is very unfriendly. And the method is already deprecated https://nodejs.org/api/url.html#url_urlobject_auth

We should expose an api to setup registry properly i.e .setRegistry(url, auth, header, etc)

mac2000 commented 4 years ago

In my case I can not pass auth via registry url because of special symbols

bencebalogh commented 4 years ago

Not strictly against it, in which cases do you want to pass additional headers to the schema registry?

Can you please both check the PR and comment if it fixes the issues?

@mac2000 Can you please give me an example which doesn't work to check if it is still an issue with the new version?

mac2000 commented 4 years ago

Looking at your code it should not be a problem

In my case imagine that you have @ symbol in password, which makes impossible to curl https://username:password@example.com

bencebalogh commented 4 years ago

Fixed in 2.0.0