use of com.couchbase.client.core.io.netty.kv.SaslListMechanismsHandler in project couchbase-jvm-clients by couchbase.
the class PasswordAuthenticator method authKeyValueConnection.
@Override
public void authKeyValueConnection(final EndpointContext ctx, final ChannelPipeline pipeline) {
boolean tls = ctx.environment().securityConfig().tlsEnabled();
pipeline.addLast(new SaslListMechanismsHandler(ctx));
pipeline.addLast(new SaslAuthenticationHandler(ctx, username.get(), password.get(), tls ? EnumSet.of(SaslMechanism.PLAIN) : allowedSaslMechanisms));
}
Aggregations