Skip to content

Commit a372769

Browse files
authored
Update JdbcConfiguration.java
1 parent 663a945 commit a372769

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

jdbc-v2/src/main/java/com/clickhouse/jdbc/internal/JdbcConfiguration.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ public JdbcConfiguration(String url, Properties info) throws SQLException {
6262

6363
// after initializing all properties - set final connection URL
6464
boolean useSSL = Boolean.parseBoolean(clientProperties.getOrDefault(DriverProperties.SECURE_CONNECTION.getKey(), "false"));
65+
String bearerToken = info.getProperty(ClientConfigProperties.BEARERTOKEN_AUTH.getKey(), null);
66+
if (bearerToken != null) {
67+
clientProperties.put(ClientConfigProperties.BEARERTOKEN_AUTH.getKey(), bearerToken);
68+
}
69+
6570
this.connectionUrl = createConnectionURL(tmpConnectionUrl, useSSL);
6671
this.isIgnoreUnsupportedRequests= Boolean.parseBoolean(getDriverProperty(DriverProperties.IGNORE_UNSUPPORTED_VALUES.getKey(), "false"));
6772
}

0 commit comments

Comments
 (0)