lib/mongo/auth/base.rb
# Checks whether reply is successful (i.e. has {ok: 1} set) and
# raises Unauthorized if not.
Checks whether reply is successful  and
raises Unauthorized if not.
Checks whether reply is successful and raises Unauthorized if not .
def validate_reply!(connection, conversation, doc)
        if doc[:ok] != 1
          message = Error::Parser.build_message(
            code: doc[:code],
            code_name: doc[:codeName],
            message: doc[:errmsg],
          )
          raise Unauthorized.new(user,
            used_mechanism: self.class.const_get(:MECHANISM),
            message: message,
            server: connection.server,
          )
        end
      end
def validate_reply! ( connection , conversation , doc ) if doc [ :ok ] != 1 message = Error :: Parser . build_message ( code : doc [ :code ] , code_name : doc [ :codeName ] , message : doc [ :errmsg ] , ) raise Unauthorized . new ( user , used_mechanism : self . class . const_get ( :MECHANISM ) , message : message , server : connection . server , ) end end
Checks whether reply is successful (i.e.
Checks whether reply is successful ( i . e .
connection
conversation
doc