Class Mongo::Auth::SCRAM
In: lib/mongo/auth/scram/conversation.rb
lib/mongo/auth/scram.rb
Parent: Object

Defines behavior for SCRAM authentication.

@since 2.0.0

Methods

login   new  

Classes and Modules

Class Mongo::Auth::SCRAM::Conversation

Constants

SCRAM_SHA_1_MECHANISM = 'SCRAM-SHA-1'.freeze   The authentication mechanism string for SCRAM-SHA-1.

@since 2.6.0

SCRAM_SHA_256_MECHANISM = 'SCRAM-SHA-256'.freeze   The authentication mechanism string for SCRAM-SHA-256.

@since 2.6.0

MECHANISMS = { scram: SCRAM_SHA_1_MECHANISM, scram256: SCRAM_SHA_256_MECHANISM   Map the user-specified authentication mechanism to the proper names of the mechanisms.

@since 2.6.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::SCRAM.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]