Search in sources :

Example 1 with SaslListMechanismsHandler

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));
}
Also used : SaslAuthenticationHandler(com.couchbase.client.core.io.netty.kv.SaslAuthenticationHandler) SaslListMechanismsHandler(com.couchbase.client.core.io.netty.kv.SaslListMechanismsHandler)

Aggregations

SaslAuthenticationHandler (com.couchbase.client.core.io.netty.kv.SaslAuthenticationHandler)1 SaslListMechanismsHandler (com.couchbase.client.core.io.netty.kv.SaslListMechanismsHandler)1