Package org.wildfly.security.sasl.util
Class SSLQueryCallbackHandler
- java.lang.Object
-
- org.wildfly.security.sasl.util.SSLQueryCallbackHandler
-
- All Implemented Interfaces:
CallbackHandler
public final class SSLQueryCallbackHandler extends Object implements CallbackHandler
A callback handler which delegates to another callback handler, passing the authentication's SSL/TLS information to that callback handler on its first invocation.- Author:
- David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description private CallbackHandler
delegate
private AtomicBoolean
once
private Supplier<SSLConnection>
sslConnectionSupplier
-
Constructor Summary
Constructors Constructor Description SSLQueryCallbackHandler(CallbackHandler delegate, Supplier<SSLConnection> sslConnectionSupplier)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
activate()
void
handle(Callback[] callbacks)
-
-
-
Field Detail
-
delegate
private final CallbackHandler delegate
-
sslConnectionSupplier
private final Supplier<SSLConnection> sslConnectionSupplier
-
once
private final AtomicBoolean once
-
-
Constructor Detail
-
SSLQueryCallbackHandler
public SSLQueryCallbackHandler(CallbackHandler delegate, Supplier<SSLConnection> sslConnectionSupplier)
Construct a new instance.- Parameters:
delegate
- the delegate callback handlersslConnectionSupplier
- supplier for the current SSL connection
-
-
Method Detail
-
handle
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
- Specified by:
handle
in interfaceCallbackHandler
- Throws:
IOException
UnsupportedCallbackException
-
activate
void activate()
-
-