public interface SyncAuthenticator extends Authenticator
This is intended for simple implementations that are fast and lightweight enough, and do not perform any blocking operations.
| Modifier and Type | Method and Description | 
|---|---|
| default CompletionStage<ByteBuffer> | evaluateChallenge(ByteBuffer challenge)Evaluate a challenge received from the server. | 
| ByteBuffer | evaluateChallengeSync(ByteBuffer challenge)Evaluate a challenge received from the server. | 
| default CompletionStage<ByteBuffer> | initialResponse()Obtain an initial response token for initializing the SASL handshake. | 
| ByteBuffer | initialResponseSync()Obtain an initial response token for initializing the SASL handshake. | 
| default CompletionStage<Void> | onAuthenticationSuccess(ByteBuffer token)Called when authentication is successful with the last information optionally sent by the
 server. | 
| void | onAuthenticationSuccessSync(ByteBuffer token)Called when authentication is successful with the last information optionally sent by the
 server. | 
@Nullable ByteBuffer initialResponseSync()
initialResponse() calls this and wraps the result in an immediately completed
 future.
null). Note that, if
     the returned byte buffer is writable, the driver will clear its contents immediately
     after use (to avoid keeping sensitive information in memory); do not reuse the same buffer
     across multiple invocations. Alternatively, if the contents are not sensitive, you can make
     the buffer read-only and safely reuse it.@Nullable ByteBuffer evaluateChallengeSync(@Nullable ByteBuffer challenge)
evaluateChallenge(ByteBuffer) calls this and wraps the result in an immediately
 completed future.
challenge - the server's SASL challenge; may be null.null to indicate the client requires no
     further action). Note that, if the returned byte buffer is writable, the driver will
     clear its contents immediately after use (to avoid keeping sensitive information in
     memory); do not reuse the same buffer across multiple invocations. Alternatively, if the
     contents are not sensitive, you can make the buffer read-only and safely reuse it.void onAuthenticationSuccessSync(@Nullable
                                 ByteBuffer token)
onAuthenticationSuccess(ByteBuffer) calls this, and then returns an immediately
 completed future.
token - the information sent by the server with the authentication successful message.
     This will be null if the server sends no particular information on authentication
     success.@NonNull default CompletionStage<ByteBuffer> initialResponse()
AuthenticatorinitialResponse in interface Authenticatornull). Note that, if the returned byte buffer is writable, the driver
     will clear its contents immediately after use (to avoid keeping sensitive
     information in memory); do not reuse the same buffer across multiple invocations.
     Alternatively, if the contents are not sensitive, you can make the buffer read-only and safely reuse it.@NonNull default CompletionStage<ByteBuffer> evaluateChallenge(@Nullable ByteBuffer challenge)
AuthenticatorevaluateChallenge in interface Authenticatorchallenge - the server's SASL challenge.@NonNull default CompletionStage<Void> onAuthenticationSuccess(@Nullable ByteBuffer token)
AuthenticatoronAuthenticationSuccess in interface Authenticatortoken - the information sent by the server with the authentication successful message.
     This will be null if the server sends no particular information on authentication
     success.Copyright © 2017–2025. All rights reserved.