StringPrep — Documentation by YARD 0.9.37 (original) (raw)

Module: Mongo::Auth::StringPrepPrivate

Extended by:

StringPrep

Included in:

StringPrep

Defined in:

lib/mongo/auth/stringprep.rb,
lib/mongo/auth/stringprep/tables.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

Modules: Tables

Instance Method Summarycollapse

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, options = {}) apply_maps(data, mappings).tap do |mapped| normalize!(mapped) if options[:normalize] check_prohibited!(mapped, prohibited) check_bidi!(mapped) if options[:bidi] end end | | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |