Class CouchbaseSaslClientFactory
java.lang.Object
com.couchbase.client.core.io.netty.kv.sasl.CouchbaseSaslClientFactory
- All Implemented Interfaces:
SaslClientFactory
This
SaslClientFactory
supports 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
-
Method Summary
Modifier and TypeMethodDescriptioncreateSaslClient
(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.
-
Constructor Details
-
CouchbaseSaslClientFactory
public CouchbaseSaslClientFactory()
-
-
Method Details
-
createSaslClient
public SaslClient createSaslClient(String[] mechanisms, String authorizationId, String protocol, String serverName, Map<String, ?> props, CallbackHandler cbh) throws SaslException- Specified by:
createSaslClient
in interfaceSaslClientFactory
- Throws:
SaslException
-
getMechanismNames
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:
getMechanismNames
in interfaceSaslClientFactory
- Parameters:
props
- the properties, ignored here.- Returns:
- all mechanisms couchbase supports.
-