@ThreadSafe public abstract class BaseDseAuthenticator extends Object implements SyncAuthenticator
SyncAuthenticator
implementations that want to make use of the
authentication scheme negotiation in DseAuthenticator
.Modifier | Constructor and Description |
---|---|
protected |
BaseDseAuthenticator(String serverAuthenticator) |
Modifier and Type | Method and Description |
---|---|
protected abstract ByteBuffer |
getInitialServerChallenge()
Return a byte buffer containing the expected successful server challenge.
|
protected abstract ByteBuffer |
getMechanism()
Return a byte buffer containing the required SASL mechanism.
|
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, evaluateChallengeSync, initialResponse, onAuthenticationSuccess
protected BaseDseAuthenticator(@NonNull String serverAuthenticator)
@NonNull protected abstract ByteBuffer getMechanism()
This should be one of:
@NonNull protected abstract ByteBuffer getInitialServerChallenge()
This should be one of:
@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.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–2024. All rights reserved.