protected static class PlainTextAuthProviderBase.PlainTextAuthenticator extends Object implements SyncAuthenticator
Modifier | Constructor and Description |
---|---|
protected |
PlainTextAuthenticator(PlainTextAuthProviderBase.Credentials credentials) |
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
evaluateChallengeSync(ByteBuffer token)
Evaluate a challenge received from the server.
|
ByteBuffer |
initialResponseSync()
Obtain an initial response token for initializing the SASL handshake.
|
void |
onAuthenticationSuccessSync(ByteBuffer token)
Called when authentication is successful with the last information optionally sent by the
server.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
evaluateChallenge, initialResponse, onAuthenticationSuccess
protected PlainTextAuthenticator(@NonNull PlainTextAuthProviderBase.Credentials credentials)
@Nullable public ByteBuffer initialResponseSync()
SyncAuthenticator
SyncAuthenticator.initialResponse()
calls this and wraps the result in an immediately completed
future.
initialResponseSync
in interface SyncAuthenticator
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 public ByteBuffer evaluateChallengeSync(@Nullable ByteBuffer token)
SyncAuthenticator
SyncAuthenticator.evaluateChallenge(ByteBuffer)
calls this and wraps the result in an immediately
completed future.
evaluateChallengeSync
in interface SyncAuthenticator
token
- 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.public void onAuthenticationSuccessSync(@Nullable ByteBuffer token)
SyncAuthenticator
SyncAuthenticator.onAuthenticationSuccess(ByteBuffer)
calls this, and then returns an immediately
completed future.
onAuthenticationSuccessSync
in interface SyncAuthenticator
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.