Package org.wildfly.security.sasl.util
Class AuthenticationTimeoutSaslServerFactory
- java.lang.Object
-
- org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
-
- org.wildfly.security.sasl.util.AuthenticationTimeoutSaslServerFactory
-
- All Implemented Interfaces:
SaslServerFactory
public final class AuthenticationTimeoutSaslServerFactory extends AbstractDelegatingSaslServerFactory
ASaslServerFactory
which adds authentication timeout functionality to a delegateSaslServerFactory
.This
SaslServerFactory
must be outside of theAuthenticationCompleteCallbackSaslServerFactory
in the chain of SASL server factories.- Author:
- Farah Juma
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_TIMEOUT
The default amount of time, in seconds, after which an authentication attempt should time out.-
Fields inherited from class org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
delegate
-
-
Constructor Summary
Constructors Constructor Description AuthenticationTimeoutSaslServerFactory(SaslServerFactory delegate, ScheduledExecutorService scheduledExecutorService)
Construct a new instance.
-
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, getMechanismNames, toString
-
-
-
-
Field Detail
-
DEFAULT_TIMEOUT
public static final long DEFAULT_TIMEOUT
The default amount of time, in seconds, after which an authentication attempt should time out.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AuthenticationTimeoutSaslServerFactory
public AuthenticationTimeoutSaslServerFactory(SaslServerFactory delegate, ScheduledExecutorService scheduledExecutorService)
Construct a new instance.- Parameters:
delegate
- the delegateSaslServerFactory
scheduledExecutorService
- the scheduled executor to use to handle authentication timeout tasks
-
-
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
-
-