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 backward compatibility, implementors should use the 3-arg constructorPlainTextAuthenticator(Credentials, EndPoint, String)instead.protectedPlainTextAuthenticator(PlainTextAuthProviderBase.Credentials credentials, EndPoint endPoint, String serverAuthenticator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBufferevaluateChallengeSync(ByteBuffer challenge)Evaluate a challenge received from the server.ByteBuffergetInitialServerChallenge()Return a byte buffer containing the expected successful server challenge.ByteBuffergetMechanism()Return a byte buffer containing the required SASL mechanism.-
Methods inherited from class com.datastax.dse.driver.api.core.auth.BaseDseAuthenticator
initialResponseSync, onAuthenticationSuccessSync
-
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, @NonNull String serverAuthenticator)
-
PlainTextAuthenticator
@Deprecated protected PlainTextAuthenticator(@NonNull PlainTextAuthProviderBase.Credentials credentials)
Deprecated.Preserved for backward compatibility, implementors should use the 3-arg constructorPlainTextAuthenticator(Credentials, EndPoint, String)instead.
-
-
Method Detail
-
getMechanism
@NonNull public ByteBuffer getMechanism()
Description copied from class:BaseDseAuthenticatorReturn a byte buffer containing the required SASL mechanism.This should be one of:
- PLAIN
- GSSAPI
- Specified by:
getMechanismin classBaseDseAuthenticator
-
getInitialServerChallenge
@NonNull public ByteBuffer getInitialServerChallenge()
Description copied from class:BaseDseAuthenticatorReturn a byte buffer containing the expected successful server challenge.This should be one of:
- PLAIN-START
- GSSAPI-START
- Specified by:
getInitialServerChallengein classBaseDseAuthenticator
-
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.
-
-