Package com.datastax.driver.core
Class AuthProvider.TransitionalModePlainTextAuthenticator
- java.lang.Object
-
- com.datastax.driver.core.AuthProvider.TransitionalModePlainTextAuthenticator
-
- All Implemented Interfaces:
Authenticator
- Enclosing interface:
- AuthProvider
public static class AuthProvider.TransitionalModePlainTextAuthenticator extends Object
Dummy Authenticator that accounts for DSE authentication configured with transitional mode.In this situation, the client is allowed to connect without authentication, but DSE would still send an AUTHENTICATE response. This Authenticator handles this situation by sending back a dummy credential.
-
-
Constructor Summary
Constructors Constructor Description TransitionalModePlainTextAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]evaluateChallenge(byte[] challenge)Evaluate a challenge received from the Server.byte[]initialResponse()Obtain an initial response token for initializing the SASL handshakevoidonAuthenticationSuccess(byte[] token)Called when authentication is successful with the last information optionally sent by the server.
-
-
-
Method Detail
-
initialResponse
public byte[] initialResponse()
Description copied from interface:AuthenticatorObtain an initial response token for initializing the SASL handshake- Specified by:
initialResponsein interfaceAuthenticator- Returns:
- the initial response to send to the server, may be null
-
evaluateChallenge
public byte[] evaluateChallenge(byte[] challenge)
Description copied from interface:AuthenticatorEvaluate a challenge received from the Server. Generally, this method should return null when authentication is complete from the client perspective- Specified by:
evaluateChallengein interfaceAuthenticator- Parameters:
challenge- the server's SASL challenge- Returns:
- updated SASL token, may be null to indicate the client requires no further action
-
onAuthenticationSuccess
public void onAuthenticationSuccess(byte[] token)
Description copied from interface:AuthenticatorCalled when authentication is successful with the last information optionally sent by the server.- Specified by:
onAuthenticationSuccessin interfaceAuthenticator- 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.
-
-