class Cql::Auth::PlainTextAuthProvider

Auth provider used for Cassandra’s built in authentication.

There is no need to create instances of this class to pass as ‘:auth_provider` to {Cql::Client.connect}, instead use the `:credentials` option and one will be created automatically for you.

Constants

PASSWORD_AUTHENTICATOR_FQCN

Public Class Methods

new(username, password) click to toggle source
# File lib/cql/auth/plain_text_auth.rb, line 11
def initialize(username, password)
  @username = username
  @password = password
end

Public Instance Methods

create_authenticator(authentication_class) click to toggle source
# File lib/cql/auth/plain_text_auth.rb, line 16
def create_authenticator(authentication_class)
  if authentication_class == PASSWORD_AUTHENTICATOR_FQCN
    PlainTextAuthenticator.new(@username, @password)
  end
end