public class CouchbaseSaslClientFactory extends Object implements SaslClientFactory
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).
Constructor and Description |
---|
CouchbaseSaslClientFactory() |
Modifier and Type | Method and Description |
---|---|
SaslClient |
createSaslClient(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.
|
public SaslClient createSaslClient(String[] mechanisms, String authorizationId, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh) throws SaslException
createSaslClient
in interface SaslClientFactory
SaslException
public String[] getMechanismNames(Map<String,?> props)
The actual selection happens somewhere else and is not bound to this list.
getMechanismNames
in interface SaslClientFactory
props
- the properties, ignored here.Copyright © 2020 Couchbase, Inc.. All rights reserved.