Class: Cassandra::Auth::Providers::Password
- Inherits:
-
Cassandra::Auth::Provider
- Object
- Cassandra::Auth::Provider
- Cassandra::Auth::Providers::Password
- Defined in:
- lib/cassandra/auth/providers/password.rb
Overview
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.
Auth provider used for Cassandra's built in authentication.
Instance Method Summary collapse
-
#create_authenticator(authentication_class) ⇒ Cassandra::Auth::Authenticator?
Returns a Password Authenticator only if
org.apache.cassandra.auth.PasswordAuthenticator
is given. -
#initialize(username, password) ⇒ Password
constructor
A new instance of Password.
Constructor Details
#initialize(username, password) ⇒ Password
Returns a new instance of Password.
51 52 53 54 |
# File 'lib/cassandra/auth/providers/password.rb', line 51 def initialize(username, password) @username = username @password = password end |
Instance Method Details
#create_authenticator(authentication_class) ⇒ Cassandra::Auth::Authenticator?
Returns a Password Authenticator only if org.apache.cassandra.auth.PasswordAuthenticator
is given.
60 61 62 63 64 |
# File 'lib/cassandra/auth/providers/password.rb', line 60 def create_authenticator(authentication_class) if authentication_class == PASSWORD_AUTHENTICATOR_FQCN Authenticator.new(@username, @password) end end |