Search in sources :

Example 1 with SaslNegotiator

use of org.apache.cassandra.auth.PasswordAuthenticator.SaslNegotiator in project cassandra by apache.

the class PasswordAuthenticatorTest method testDecodeIllegalUserAndPwd.

private void testDecodeIllegalUserAndPwd(String username, String password) {
    SaslNegotiator negotiator = authenticator.newSaslNegotiator(null);
    Authenticator clientAuthenticator = (new PlainTextAuthProvider(username, password)).newAuthenticator((EndPoint) null, null);
    negotiator.evaluateResponse(clientAuthenticator.initialResponse());
    negotiator.getAuthenticatedUser();
}
Also used : SaslNegotiator(org.apache.cassandra.auth.PasswordAuthenticator.SaslNegotiator) PlainTextAuthProvider(com.datastax.driver.core.PlainTextAuthProvider) Authenticator(com.datastax.driver.core.Authenticator)

Aggregations

Authenticator (com.datastax.driver.core.Authenticator)1 PlainTextAuthProvider (com.datastax.driver.core.PlainTextAuthProvider)1 SaslNegotiator (org.apache.cassandra.auth.PasswordAuthenticator.SaslNegotiator)1