Module Mongo::Auth
In: lib/mongo/auth/x509/conversation.rb
lib/mongo/auth/x509.rb
lib/mongo/auth/user/view.rb
lib/mongo/auth/cr.rb
lib/mongo/auth/stringprep/tables.rb
lib/mongo/auth/stringprep/profiles/sasl.rb
lib/mongo/auth/scram/conversation.rb
lib/mongo/auth/roles.rb
lib/mongo/auth/stringprep.rb
lib/mongo/auth/cr/conversation.rb
lib/mongo/auth/scram.rb
lib/mongo/auth/ldap.rb
lib/mongo/auth/ldap/conversation.rb
lib/mongo/auth/user.rb
lib/mongo/auth.rb

This namespace contains all authentication related behavior.

@since 2.0.0

Methods

get  

Classes and Modules

Module Mongo::Auth::Roles
Module Mongo::Auth::StringPrep
Class Mongo::Auth::CR
Class Mongo::Auth::InvalidMechanism
Class Mongo::Auth::LDAP
Class Mongo::Auth::SCRAM
Class Mongo::Auth::Unauthorized
Class Mongo::Auth::User
Class Mongo::Auth::X509

Constants

EXTERNAL = '$external'.freeze   The external database name.

@since 2.0.0

GET_NONCE = { getnonce: 1 }.freeze   Constant for the nonce command.

@since 2.0.0

NONCE = 'nonce'.freeze   Constant for the nonce field.

@since 2.0.0

SOURCES = { mongodb_cr: CR, mongodb_x509: X509, plain: LDAP, scram: SCRAM, scram256: SCRAM, }   Map the symbols parsed from the URI connection string to strategies.

@since 2.0.0

Public Instance methods

Get the authorization strategy for the provided auth mechanism.

@example Get the strategy.

  Auth.get(user)

@param [ Auth::User ] user The user object.

@return [ CR, X509, LDAP, Kerberos ] The auth strategy.

@since 2.0.0

[Validate]