Module: Mongo::Auth::StringPrep Private
- Extended by:
- StringPrep
- Included in:
- StringPrep
- Defined in:
- lib/mongo/auth/stringprep.rb,
lib/mongo/auth/stringprep/tables.rb,
lib/mongo/auth/stringprep/profiles/sasl.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
This namespace contains all behavior related to string preparation (RFC 3454). It’s used to implement SCRAM-SHA-256 authentication, which is available in MongoDB server versions 4.0 and later.
Defined Under Namespace
Instance Method Summary collapse
-
#prepare(data, mappings, prohibited, options = {}) ⇒ Object
private
Prepare a string given a set of mappings and prohibited character tables.
Instance Method Details
#prepare(data, mappings, prohibited, options = {}) ⇒ Object
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.
Prepare a string given a set of mappings and prohibited character tables.
54 55 56 57 58 59 60 |
# File 'lib/mongo/auth/stringprep.rb', line 54 def prepare(data, mappings, prohibited, = {}) apply_maps(data, mappings).tap do |mapped| normalize!(mapped) if [:normalize] check_prohibited!(mapped, prohibited) check_bidi!(mapped) if [:bidi] end end |