Auth provider used for Cassandra’s built in authentication.

Note
No need to instantiate this class manually, use :username and :password options when calling Cassandra.cluster and one will be created automatically for you.

Inherits

Methods

self.

new

(username, password)

Returns a new instance of Password

Parameters:
Name Type Details
username String username to use for authentication to Cassandra
password String password to use for authentication to Cassandra

create_authenticator

(authentication_class)

Returns a Password Authenticator

Parameters:
Name Type Details
authentication_class String ignored
Returns:
Type Details
Auth::Authenticator
Specifications:
Password#create_authenticator creates a PasswordAuthenticator
authenticator = auth_provider.create_authenticator(standard_authentication_class)
authenticator.initial_response.should == "\x00foo\x00bar"
Password#create_authenticator returns nil when the authentication class is not org.apache.cassandra.auth.PasswordAuthenticator
authenticator = auth_provider.create_authenticator('org.acme.Foo')
authenticator.initial_response.should == "\x00foo\x00bar"