Package com.datastax.driver.core

Examples of com.datastax.driver.core.PlainTextAuthProvider$PlainTextAuthenticator


        String username = container.env().get(ENV_VAR_USERNAME);
        String password = container.env().get(ENV_VAR_PASSWORD);

        if (!Strings.isNullOrEmpty(username) && !Strings.isNullOrEmpty(password)) {
            authProvider = new PlainTextAuthProvider(username, password);
        } else {
            super.initAuthProvider(config);
        }

    }
View Full Code Here


        .addContactPoints(hostStrings)
        .withPort(port);

    if (null != cassandraKijiURI.getUsername()) {
      clusterBuilder.withAuthProvider(
          new PlainTextAuthProvider(cassandraKijiURI.getUsername(), cassandraKijiURI.getPassword())
      );
    }

    final Cluster cluster = clusterBuilder.build();
    final Session cassandraSession = cluster.connect();
View Full Code Here

   
    AuthProvider authProvider = AuthProvider.NONE;
   
    AuthenticationCredentials creds = cpConfig.getAuthenticationCredentials();
    if (creds != null) {
      authProvider = new PlainTextAuthProvider(creds.getUsername(), creds.getPassword());
    }
   
    return new ProtocolOptions(port, protocolVersion, null, authProvider);
  }
View Full Code Here

TOP

Related Classes of com.datastax.driver.core.PlainTextAuthProvider$PlainTextAuthenticator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.