Class Mongo::Auth::CR
In: lib/mongo/auth/cr.rb
lib/mongo/auth/cr/conversation.rb
Parent: Object

Defines behavior for MongoDB-CR authentication.

@since 2.0.0 @deprecated MONGODB-CR authentication mechanism is deprecated

  as of MongoDB 3.6. Support for it in the Ruby driver will be
  removed in driver version 3.0. Please use SCRAM instead.

Methods

login   new  

Classes and Modules

Class Mongo::Auth::CR::Conversation

Constants

MECHANISM = 'MONGODB-CR'.freeze   The authentication mechinism string.

@since 2.0.0

Attributes

user  [R]  @return [ Mongo::Auth::User ] The user to authenticate.

Public Class methods

Instantiate a new authenticator.

@example Create the authenticator.

  Mongo::Auth::CR.new(user)

@param [ Mongo::Auth::User ] user The user to authenticate.

@since 2.0.0

Public Instance methods

Log the user in on the given connection.

@example Log the user in.

  user.login(connection)

@param [ Mongo::Connection ] connection The connection to log into.

@return [ Protocol::Message ] The authentication response.

@since 2.0.0

[Validate]