Package com.rabbitmq.stream.sasl
Class JdkSaslConfiguration
java.lang.Object
com.rabbitmq.stream.sasl.JdkSaslConfiguration
- All Implemented Interfaces:
SaslConfiguration
SaslConfiguration
using the JDK SASL support.
This is not the default because SASL is not available on all environments, e.g. Android. This code is based on the implementation from RabbitMQ Java client.
-
Constructor Summary
ConstructorDescriptionJdkSaslConfiguration
(CredentialsProvider credentialsProvider, Supplier<String> serverNameSupplier) JdkSaslConfiguration
(CredentialsProvider credentialsProvider, Supplier<String> serverNameSupplier, String[] mechanisms) -
Method Summary
Modifier and TypeMethodDescriptiongetSaslMechanism
(List<String> serverMechanisms) Pick mechanism according to the ones passed in.
-
Constructor Details
-
JdkSaslConfiguration
public JdkSaslConfiguration(CredentialsProvider credentialsProvider, Supplier<String> serverNameSupplier) -
JdkSaslConfiguration
public JdkSaslConfiguration(CredentialsProvider credentialsProvider, Supplier<String> serverNameSupplier, String[] mechanisms)
-
-
Method Details
-
getSaslMechanism
Description copied from interface:SaslConfiguration
Pick mechanism according to the ones passed in.- Specified by:
getSaslMechanism
in interfaceSaslConfiguration
- Parameters:
serverMechanisms
- supported mechanisms by the server- Returns:
- the mechanism to use for authentication
-