Skip to content

Commit 67f6500

Browse files
committed
Fix minor details around programmatic authentication
1 parent bfce1be commit 67f6500

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

core/src/main/java/com/datastax/oss/driver/api/core/session/SessionBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public SelfT withSchemaChangeListener(@Nullable SchemaChangeListener schemaChang
208208
}
209209

210210
/**
211-
* Register a request tracker to use with the session.
211+
* Registers a request tracker to use with the session.
212212
*
213213
* <p>If the tracker is specified programmatically with this method, it overrides the
214214
* configuration (that is, the {@code request.tracker.class} option will be ignored).
@@ -220,7 +220,7 @@ public SelfT withRequestTracker(@Nullable RequestTracker requestTracker) {
220220
}
221221

222222
/**
223-
* Register an authentication provider to use with the session.
223+
* Registers an authentication provider to use with the session.
224224
*
225225
* <p>If the provider is specified programmatically with this method, it overrides the
226226
* configuration (that is, the {@code advanced.auth-provider.class} option will be ignored).

core/src/main/java/com/datastax/oss/driver/internal/core/context/DefaultDriverContext.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ public class DefaultDriverContext implements InternalDriverContext {
193193
private final NodeStateListener nodeStateListenerFromBuilder;
194194
private final SchemaChangeListener schemaChangeListenerFromBuilder;
195195
private final RequestTracker requestTrackerFromBuilder;
196-
private final AuthProvider authProviderFromBuilder;
197196
private final Map<String, String> localDatacentersFromBuilder;
198197
private final Map<String, Predicate<Node>> nodeFiltersFromBuilder;
199198
private final ClassLoader classLoader;
@@ -226,11 +225,12 @@ public DefaultDriverContext(
226225
() -> buildSchemaChangeListener(schemaChangeListenerFromBuilder),
227226
cycleDetector);
228227
this.requestTrackerFromBuilder = programmaticArguments.getRequestTracker();
229-
this.authProviderFromBuilder = programmaticArguments.getAuthProvider();
230228

231229
this.authProviderRef =
232230
new LazyReference<>(
233-
"authProvider", () -> buildAuthProvider(authProviderFromBuilder), cycleDetector);
231+
"authProvider",
232+
() -> buildAuthProvider(programmaticArguments.getAuthProvider()),
233+
cycleDetector);
234234
this.requestTrackerRef =
235235
new LazyReference<>(
236236
"requestTracker", () -> buildRequestTracker(requestTrackerFromBuilder), cycleDetector);

core/src/main/resources/reference.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,9 @@ datastax-java-driver {
382382
# Required: no. If the 'class' child option is absent, no authentication will occur.
383383
# Modifiable at runtime: no
384384
# Overridable in a profile: no
385+
#
386+
# Note that the contents of this section can be overridden programmatically with
387+
# SessionBuilder.withAuthProvider or SessionBuilder.withAuthCredentials.
385388
advanced.auth-provider {
386389
# The class of the provider. If it is not qualified, the driver assumes that it resides in the
387390
# package com.datastax.oss.driver.internal.core.auth.

0 commit comments

Comments
 (0)