Was this page helpful?
Authentication¶
Plain text¶
Credentials are provided using the cass_cluster_set_credentials()
function.
CassCluster* cluster = cass_cluster_new();
const char* username = "cassandra";
const char* password = "cassandra";
cass_cluster_set_credentials(cluster, username, password);
/* Connect session object */
cass_cluster_free(cluster);
Important: The credentials are sent in plain text to the server. For this reason, it is highly recommended that this be used in conjunction with client-to-node encryption (TLS), or in a trusted network environment.