Module | Moped::Authenticatable |
In: |
lib/moped/authenticatable.rb
|
Provides behaviour to nodes around authentication.
@since 2.0.0
Apply authentication credentials.
@example Apply the authentication credentials.
node.apply_credentials({ "moped_test" => [ "user", "pass" ]})
@param [ Hash ] credentials The authentication credentials in the form:
{ database_name: [ user, password ]}
@return [ Object ] The authenticated object.
@since 2.0.0
Get the applied credentials.
@example Get the applied credentials.
node.credentials
@return [ Hash ] The credentials.
@since 2.0.0
Login the user to the provided database with the supplied password.
@example Login the user to the database.
node.login("moped_test", "user", "pass")
@param [ String ] database The database name. @param [ String ] username The username. @param [ String ] password The password.
@raise [ Errors::AuthenticationFailure ] If the login failed.
@return [ Array ] The username and password.
@since 2.0.0