perlcassa
perlcassa copied to clipboard
Added simple authentication support to perlcassa
Tried to add authentication support for perlcassa. Please feel free to re-factor. It works for me on a single-node Cassandra 2.1 cluster with PasswordAuthenticator.
my $client = new perlcassa(
keyspace => 'mykeyspace,
hosts => ['localhost'],
do_not_discover_peers => 1,
'credentials' => { 'username' => 'cassandra', 'password' => 'cassandra' },
);
my $result = $client->exec("SELECT id from my_table limit 1");
Not sure whether perlcassa::Client::check_host should also authenticate. Could add authentication there as well