Class: Cql::Auth::PlainTextAuthProvider
- Inherits:
-
Object
- Object
- Cql::Auth::PlainTextAuthProvider
- Defined in:
- lib/cql/auth/plain_text_auth.rb
Overview
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 Client.connect, instead use the :credentials
option and one
will be created automatically for you.
Instance Method Summary collapse
- #create_authenticator(authentication_class) ⇒ Object
-
#initialize(username, password) ⇒ PlainTextAuthProvider
constructor
A new instance of PlainTextAuthProvider.
Constructor Details
#initialize(username, password) ⇒ PlainTextAuthProvider
Returns a new instance of PlainTextAuthProvider.
11 12 13 14 |
# File 'lib/cql/auth/plain_text_auth.rb', line 11 def initialize(username, password) @username = username @password = password end |
Instance Method Details
#create_authenticator(authentication_class) ⇒ Object
16 17 18 19 20 |
# 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 |