Class CouchbaseSaslClientFactory
- java.lang.Object
-
- com.couchbase.client.core.io.netty.kv.sasl.CouchbaseSaslClientFactory
-
- All Implemented Interfaces:
SaslClientFactory
public class CouchbaseSaslClientFactory extends Object implements SaslClientFactory
ThisSaslClientFactorysupports all couchbase supported SASL authentication mechanisms.It first tries to establish a SCRAM-SHA*-based sasl client, but if the mechanism is not supported then it will fall back to the JVM-implemented one which supports the rest (i.e. PLAIN and CRAM-MD5).
- Since:
- 2.0.0
-
-
Constructor Summary
Constructors Constructor Description CouchbaseSaslClientFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SaslClientcreateSaslClient(String[] mechanisms, String authorizationId, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh)String[]getMechanismNames(Map<String,?> props)Note that this method should be never used, but for completeness sake it returns all supported mechanisms by Couchbase.
-
-
-
Method Detail
-
createSaslClient
public SaslClient createSaslClient(String[] mechanisms, String authorizationId, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh) throws SaslException
- Specified by:
createSaslClientin interfaceSaslClientFactory- Throws:
SaslException
-
getMechanismNames
public String[] getMechanismNames(Map<String,?> props)
Note that this method should be never used, but for completeness sake it returns all supported mechanisms by Couchbase.The actual selection happens somewhere else and is not bound to this list.
- Specified by:
getMechanismNamesin interfaceSaslClientFactory- Parameters:
props- the properties, ignored here.- Returns:
- all mechanisms couchbase supports.
-
-