Class PlainTextAuthProviderBase.PlainTextAuthenticator
- java.lang.Object
-
- com.datastax.dse.driver.api.core.auth.BaseDseAuthenticator
-
- com.datastax.oss.driver.api.core.auth.PlainTextAuthProviderBase.PlainTextAuthenticator
-
- All Implemented Interfaces:
Authenticator,SyncAuthenticator
- Enclosing class:
- PlainTextAuthProviderBase
protected static class PlainTextAuthProviderBase.PlainTextAuthenticator extends BaseDseAuthenticator
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPlainTextAuthenticator(PlainTextAuthProviderBase.Credentials credentials)Deprecated.Preserved for existing plaintext subclasses.protectedPlainTextAuthenticator(PlainTextAuthProviderBase.Credentials credentials, EndPoint endPoint)protectedPlainTextAuthenticator(PlainTextAuthProviderBase.Credentials credentials, EndPoint endPoint, String serverAuthenticator)Deprecated.DSE authentication negotiation is no longer supported.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ByteBufferevaluateChallengeSync(ByteBuffer challenge)Evaluate a challenge received from the server.ByteBuffergetInitialServerChallenge()Deprecated.DSE authentication negotiation is no longer supported.ByteBuffergetMechanism()Deprecated.DSE authentication negotiation is no longer supported.ByteBufferinitialResponseSync()Obtain an initial response token for initializing the SASL handshake.voidonAuthenticationSuccessSync(ByteBuffer token)Called when authentication is successful with the last information optionally sent by the server.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.datastax.oss.driver.api.core.auth.SyncAuthenticator
evaluateChallenge, initialResponse, onAuthenticationSuccess
-
-
-
-
Constructor Detail
-
PlainTextAuthenticator
protected PlainTextAuthenticator(@NonNull PlainTextAuthProviderBase.Credentials credentials, @NonNull EndPoint endPoint)
-
PlainTextAuthenticator
@Deprecated protected PlainTextAuthenticator(@NonNull PlainTextAuthProviderBase.Credentials credentials, @NonNull EndPoint endPoint, @NonNull String serverAuthenticator)
Deprecated.DSE authentication negotiation is no longer supported. Ordinary server authenticators remain supported.Builds an authenticator for ordinary SASL PLAIN authentication.
-
PlainTextAuthenticator
@Deprecated protected PlainTextAuthenticator(@NonNull PlainTextAuthProviderBase.Credentials credentials)
Deprecated.Preserved for existing plaintext subclasses. UsePlainTextAuthenticator(Credentials, EndPoint)instead.
-
-
Method Detail
-
getMechanism
@Deprecated @NonNull public ByteBuffer getMechanism()
Deprecated.DSE authentication negotiation is no longer supported.- Specified by:
getMechanismin classBaseDseAuthenticator
-
getInitialServerChallenge
@Deprecated @NonNull public ByteBuffer getInitialServerChallenge()
Deprecated.DSE authentication negotiation is no longer supported.- Specified by:
getInitialServerChallengein classBaseDseAuthenticator
-
initialResponseSync
@Nullable public ByteBuffer initialResponseSync()
Description copied from interface:SyncAuthenticatorObtain an initial response token for initializing the SASL handshake.SyncAuthenticator.initialResponse()calls this and wraps the result in an immediately completed future.- Specified by:
initialResponseSyncin interfaceSyncAuthenticator- Overrides:
initialResponseSyncin classBaseDseAuthenticator- Returns:
- The initial response to send to the server (which may be
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.
-
evaluateChallengeSync
@Nullable public ByteBuffer evaluateChallengeSync(@Nullable ByteBuffer challenge)
Description copied from interface:SyncAuthenticatorEvaluate a challenge received from the server.SyncAuthenticator.evaluateChallenge(ByteBuffer)calls this and wraps the result in an immediately completed future.- Parameters:
challenge- the server's SASL challenge; may benull.- Returns:
- The updated SASL token (which may be
nullto 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.
-
onAuthenticationSuccessSync
public void onAuthenticationSuccessSync(@Nullable ByteBuffer token)Description copied from interface:SyncAuthenticatorCalled when authentication is successful with the last information optionally sent by the server.SyncAuthenticator.onAuthenticationSuccess(ByteBuffer)calls this, and then returns an immediately completed future.- Specified by:
onAuthenticationSuccessSyncin interfaceSyncAuthenticator- Overrides:
onAuthenticationSuccessSyncin classBaseDseAuthenticator- Parameters:
token- the information sent by the server with the authentication successful message. This will benullif the server sends no particular information on authentication success.
-
-