Class: Cql::Auth::PlainTextAuthenticator

Inherits:
Object
  • Object
show all
Defined in:
lib/cql/auth/plain_text_auth.rb

Overview

Authenticator used for Cassandra's built in authentication, see PlainTextAuthProvider

Instance Method Summary collapse

Constructor Details

#initialize(username, password) ⇒ PlainTextAuthenticator

Returns a new instance of PlainTextAuthenticator.



30
31
32
33
# File 'lib/cql/auth/plain_text_auth.rb', line 30

def initialize(username, password)
  @username = username
  @password = password
end

Instance Method Details

#authentication_successful(token) ⇒ Object



42
43
# File 'lib/cql/auth/plain_text_auth.rb', line 42

def authentication_successful(token)
end

#challenge_response(token) ⇒ Object



39
40
# File 'lib/cql/auth/plain_text_auth.rb', line 39

def challenge_response(token)
end

#initial_responseObject



35
36
37
# File 'lib/cql/auth/plain_text_auth.rb', line 35

def initial_response
  "\x00#{@username}\x00#{@password}"
end