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
).@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).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()
Authenticator
initialResponse
in interface Authenticator
null
).@NonNull default CompletionStage<ByteBuffer> evaluateChallenge(@Nullable ByteBuffer challenge)
Authenticator
evaluateChallenge
in interface Authenticator
challenge
- the server's SASL challenge.@NonNull default CompletionStage<Void> onAuthenticationSuccess(@Nullable ByteBuffer token)
Authenticator
onAuthenticationSuccess
in interface Authenticator
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.Copyright © 2017–2019. All rights reserved.