Skip to content

Commit 3b36c86

Browse files
committed
JVMCBC-1689 (followup) JwtAuthenticator should include SaslListMechanismsHandler
Motivation ---------- Even though we don't strictly need to list the authentication mechanisms, downstream code that handles auth failure expects to see channel attributes that were set by `SaslListMechanismsHandler`. Change-Id: Id1366c864250a5173e9b9bfb3fc33b8ccc2dccf6 Reviewed-on: https://review.couchbase.org/c/couchbase-jvm-clients/+/235874 Tested-by: Build Bot <[email protected]> Reviewed-by: Graham Pople <[email protected]>
1 parent 65cfc56 commit 3b36c86

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core-io/src/main/java/com/couchbase/client/core/env/JwtAuthenticator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.couchbase.client.core.deps.io.netty.channel.ChannelPipeline;
2222
import com.couchbase.client.core.endpoint.EndpointContext;
2323
import com.couchbase.client.core.io.netty.kv.SaslAuthenticationHandler;
24+
import com.couchbase.client.core.io.netty.kv.SaslListMechanismsHandler;
2425
import com.couchbase.client.core.io.netty.kv.sasl.OauthBearerSaslClient;
2526
import com.couchbase.client.core.json.Mapper;
2627
import org.jspecify.annotations.NullMarked;
@@ -119,6 +120,7 @@ private JwtAuthenticator(String encodedJwt) {
119120

120121
@Override
121122
public void authKeyValueConnection(EndpointContext ctx, ChannelPipeline pipeline) {
123+
pipeline.addLast(new SaslListMechanismsHandler(ctx));
122124
pipeline.addLast(new SaslAuthenticationHandler(
123125
ctx,
124126
null, // username not required

0 commit comments

Comments
 (0)