Package org.wildfly.security.sasl.util
Class SSLSaslServerFactory
- java.lang.Object
-
- org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
-
- org.wildfly.security.sasl.util.SSLSaslServerFactory
-
- All Implemented Interfaces:
SaslServerFactory
public final class SSLSaslServerFactory extends AbstractDelegatingSaslServerFactory implements SaslServerFactory
A SASL server factory which provides information about the security layer of the connection to the callback handler.- Author:
- David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description private Supplier<SSLConnection>
sslConnectionSupplier
-
Fields inherited from class org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
delegate
-
-
Constructor Summary
Constructors Constructor Description SSLSaslServerFactory(Supplier<SSLConnection> sslConnectionSupplier, SaslServerFactory delegate)
Construct a new instance.SSLSaslServerFactory(SaslServerFactory delegate, Supplier<SSLSession> sslSession)
Deprecated.UseSSLSaslServerFactory(Supplier, SaslServerFactory)
to avoid problems where a TLS server is acting as a SASL client.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SaslServer
createSaslServer(String mechanism, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh)
-
Methods inherited from class org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
delegatesThrough, delegatesThroughNN, getMechanismNames, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.security.sasl.SaslServerFactory
getMechanismNames
-
-
-
-
Field Detail
-
sslConnectionSupplier
private final Supplier<SSLConnection> sslConnectionSupplier
-
-
Constructor Detail
-
SSLSaslServerFactory
public SSLSaslServerFactory(Supplier<SSLConnection> sslConnectionSupplier, SaslServerFactory delegate)
Construct a new instance.- Parameters:
sslConnectionSupplier
- supplier for the current SSL connectiondelegate
- the delegate SASL server factory
-
SSLSaslServerFactory
@Deprecated public SSLSaslServerFactory(SaslServerFactory delegate, Supplier<SSLSession> sslSession)
Deprecated.UseSSLSaslServerFactory(Supplier, SaslServerFactory)
to avoid problems where a TLS server is acting as a SASL client.Construct a new instance. The session connection is assumed to be in server mode.- Parameters:
sslSession
- supplier for the current SSL sessiondelegate
- the delegate SASL server factory
-
-
Method Detail
-
createSaslServer
public SaslServer createSaslServer(String mechanism, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh) throws SaslException
- Specified by:
createSaslServer
in interfaceSaslServerFactory
- Overrides:
createSaslServer
in classAbstractDelegatingSaslServerFactory
- Throws:
SaslException
-
-