Skip to content

Authentication problems #63

@micopiira

Description

@micopiira

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions