class Moped::Protocol::Commands::Authenticate

Implementation of the authentication command for Mongo. See: www.mongodb.org/display/DOCS/Implementing+Authentication+in+a+Driver for details.

@example

socket.write Command.new :admin, getnonce: 1
reply = Reply.deserialize socket
socket.write Authenticate.new :admin, "username", "password",
  reply.documents[0]["nonce"]
Reply.deserialize(socket).documents[0]["ok"] # => 1.0