class Mongo::Auth::ConversationBase

Defines common behavior around authentication conversations between the client and the server.

@api private

Attributes

connection[R]

@return [ Mongo::Connection ] The connection to authenticate over.

user[R]

@return [ Auth::User ] user The user for the conversation.

Public Class Methods

new(user, connection, **opts) click to toggle source

Create the new conversation.

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

over.
# File lib/mongo/auth/conversation_base.rb, line 29
def initialize(user, connection, **opts)
  @user = user
  @connection = connection
end

Public Instance Methods

speculative_auth_document() click to toggle source

Returns the hash to provide to the server in the handshake as value of the speculativeAuthenticate key.

If the auth mechanism does not support speculative authentication, this method returns nil.

@return [ Hash | nil ] Speculative authentication document.

# File lib/mongo/auth/conversation_base.rb, line 47
def speculative_auth_document
  nil
end