Module: Mongo::Auth
- Extended by:
- Auth
- Included in:
- Auth
- Defined in:
- build/ruby-driver-v2.19/lib/mongo/auth.rb,
build/ruby-driver-v2.19/lib/mongo/auth/cr.rb,
build/ruby-driver-v2.19/lib/mongo/auth/aws.rb,
build/ruby-driver-v2.19/lib/mongo/auth/base.rb,
build/ruby-driver-v2.19/lib/mongo/auth/ldap.rb,
build/ruby-driver-v2.19/lib/mongo/auth/user.rb,
build/ruby-driver-v2.19/lib/mongo/auth/x509.rb,
build/ruby-driver-v2.19/lib/mongo/auth/roles.rb,
build/ruby-driver-v2.19/lib/mongo/auth/scram.rb,
build/ruby-driver-v2.19/lib/mongo/auth/gssapi.rb,
build/ruby-driver-v2.19/lib/mongo/auth/scram256.rb,
build/ruby-driver-v2.19/lib/mongo/auth/user/view.rb,
build/ruby-driver-v2.19/lib/mongo/auth/stringprep.rb,
build/ruby-driver-v2.19/lib/mongo/auth/aws/request.rb,
build/ruby-driver-v2.19/lib/mongo/auth/aws/credentials.rb,
build/ruby-driver-v2.19/lib/mongo/auth/cr/conversation.rb,
build/ruby-driver-v2.19/lib/mongo/auth/aws/conversation.rb,
build/ruby-driver-v2.19/lib/mongo/auth/credential_cache.rb,
build/ruby-driver-v2.19/lib/mongo/auth/conversation_base.rb,
build/ruby-driver-v2.19/lib/mongo/auth/ldap/conversation.rb,
build/ruby-driver-v2.19/lib/mongo/auth/stringprep/tables.rb,
build/ruby-driver-v2.19/lib/mongo/auth/x509/conversation.rb,
build/ruby-driver-v2.19/lib/mongo/auth/scram/conversation.rb,
build/ruby-driver-v2.19/lib/mongo/auth/gssapi/conversation.rb,
build/ruby-driver-v2.19/lib/mongo/auth/aws/credentials_cache.rb,
build/ruby-driver-v2.19/lib/mongo/auth/scram256/conversation.rb,
build/ruby-driver-v2.19/lib/mongo/auth/sasl_conversation_base.rb,
build/ruby-driver-v2.19/lib/mongo/auth/scram_conversation_base.rb,
build/ruby-driver-v2.19/lib/mongo/auth/stringprep/profiles/sasl.rb,
build/ruby-driver-v2.19/lib/mongo/auth/aws/credentials_retriever.rb
Overview
This namespace contains all authentication related behavior.
Defined Under Namespace
Modules: CredentialCache, Roles, StringPrep Classes: Aws, Base, CR, ConversationBase, Gssapi, InvalidConfiguration, InvalidMechanism, LDAP, SaslConversationBase, Scram, Scram256, ScramConversationBase, Unauthorized, User, X509
Constant Summary collapse
- EXTERNAL =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
The external database name.
'$external'.freeze
- GET_NONCE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Constant for the nonce command.
{ getnonce: 1 }.freeze
- NONCE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Constant for the nonce field.
'nonce'.freeze
- SOURCES =
Note:
This map is not frozen because when mongo_kerberos is loaded, it mutates this map by adding the Kerberos authenticator.
Map the symbols parsed from the URI connection string to strategies.
{ aws: Aws, gssapi: Gssapi, mongodb_cr: CR, mongodb_x509: X509, plain: LDAP, scram: Scram, scram256: Scram256, }
Instance Method Summary collapse
-
#get(user, connection, **opts) ⇒ Auth::Aws | Auth::CR | Auth::Gssapi | Auth::LDAP | Auth::Scram | Auth::Scram256 | Auth::X509
private
Get an authenticator for the provided user to authenticate over the provided connection.
Instance Method Details
#get(user, connection, **opts) ⇒ Auth::Aws | Auth::CR | Auth::Gssapi | Auth::LDAP | Auth::Scram | Auth::Scram256 | Auth::X509
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Get an authenticator for the provided user to authenticate over the provided connection.
97 98 99 100 101 |
# File 'build/ruby-driver-v2.19/lib/mongo/auth.rb', line 97 def get(user, connection, **opts) mechanism = user.mechanism raise InvalidMechanism.new(mechanism) if !SOURCES.has_key?(mechanism) SOURCES[mechanism].new(user, connection, **opts) end |