com.datastax.driver.auth
Class PrivilegedSaslClient
java.lang.Object
com.datastax.driver.auth.PrivilegedSaslClient
public class PrivilegedSaslClient
- extends Object
Wrapper around SaslClient
, which performs necessary parts of
the authentication protocol as PrivilegedAction
s with the
assumed identity of the Subject
supplied in the constructor.
Method Summary |
byte[] |
evaluateChallenge(byte[] challenge)
Respond to server's SASL token |
byte[] |
getInitialResponse()
Generate an initial token to start the SASL handshake with server. |
boolean |
isComplete()
Is the SASL negotiation with the server complete |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_PROPERTIES
public static final Map<String,String> DEFAULT_PROPERTIES
PrivilegedSaslClient
public PrivilegedSaslClient(Subject clientIdentity,
String[] mechanisms,
String authzId,
String protocol,
String hostname,
Map<String,String> properties,
CallbackHandler callbackHandler)
getInitialResponse
public byte[] getInitialResponse()
- Generate an initial token to start the SASL handshake with server.
- Returns:
- SaslTokenRequestMessage message to be sent to server.
- Throws:
IOException
evaluateChallenge
public byte[] evaluateChallenge(byte[] challenge)
- Respond to server's SASL token
- Parameters:
challenge
- contains server's SASL token
- Returns:
- client's response SASL token, which will be null if authentication is complete
isComplete
public boolean isComplete()
- Is the SASL negotiation with the server complete
- Returns:
- true iff SASL authentication has successfully completed
Copyright © 2014. All rights reserved.