com.datastax.driver.core
Interface Authenticator

All Known Implementing Classes:
KerberosAuthenticator

public interface Authenticator

Handles SASL authentication with Cassandra servers. A server which requires authentication responds to a startup message with an challenge in the form of an AuthenticateMessage. Authenticator implementations should be able to respond to that challenge and perform whatever authentication negotiation is required by the server. The exact nature of that negotiation is specific to the configuration of the server.


Method Summary
 byte[] evaluateChallenge(byte[] challenge)
          Evaluate a challenge received from the Server.
 byte[] initialResponse()
          Obtain an initial response token for initializing the SASL handshake
 

Method Detail

initialResponse

byte[] initialResponse()
Obtain an initial response token for initializing the SASL handshake

Returns:
the initial response to send to the server, may be null

evaluateChallenge

byte[] evaluateChallenge(byte[] challenge)
Evaluate a challenge received from the Server. Generally, this method should return null when authentication is complete from the client perspective

Parameters:
challenge - the server's SASL challenge
Returns:
updated SASL token, may be null to indicate the client requires no further action


Copyright © 2013. All Rights Reserved.