I managed to get the driver working with Couchbase 6.0.0.
However authentication using DriverManager#getConnection(String url, String user, String password) does not work.
I see it is possible to authenticate like this:
Properties properties = new Properties();
properties.put("credentials", "[{\"user\": \"Administrator\", \"pass\": \"password\"}]");
Connection con = DriverManager.getConnection("jdbc:couchbase://localhost:8093", properties);
This works for some queries, but queries that send POST requests (with a JSON body) don't work, because the creds is being sent as a string instead of a JSON array.
I will submit a PR soon that fixes this by converting the credentials string into a java.util.List using ObjectMapper whenever necessary in
|
parameters.put(CREDENTIALS, credentials); |
I managed to get the driver working with Couchbase 6.0.0.
However authentication using
DriverManager#getConnection(String url, String user, String password)does not work.I see it is possible to authenticate like this:
This works for some queries, but queries that send POST requests (with a JSON body) don't work, because the
credsis being sent as a string instead of a JSON array.I will submit a PR soon that fixes this by converting the credentials string into a
java.util.ListusingObjectMapperwhenever necessary injdbc-cb/src/main/java/com/couchbase/jdbc/core/ProtocolImpl.java
Line 897 in 2511caa