fxa-customs-server/lib
Shane Tomlinson 6f73c3c8b8
refactor(server): Extract and simplify record retreival/storage, user defined rules.
server.js has a whole bunch of mixed concerns, part of which was record retreival
and loading/checking user defined rules.

This PR extracts record handling logic as well as user defined rules logic
into their own modules.

Loading/saving records can now be done through a common interface. fetchRecords no longer
holds the assumption that an ip address will be passed in. setRecord no longer requires
passing in a key as the key is stored on the record, and setRecords now only accepts records
instead of it's confusing signature.  It's now possible to define non-enumerable
properties on a record that are not saved when serialized.

I started to use async/await to simplify logic where it made sense as well as
started down the path to using native promises in places.

Note, no remote tests are modified, so functionality should be the same.

This is groundwork to simplify the DataFlow integration where a simple API is
needed to fetch records of varying types.
2019-03-21 12:28:56 +00:00
..
bans refactor(server): Extract and simplify record retreival/storage, user defined rules. 2019-03-21 12:28:56 +00:00
config feat(fraud-detection): Listen for DataFlow fraud detection events 2019-03-01 17:06:56 +00:00
settings fix(logs): preserve homogeneity of more log properties 2019-02-06 14:17:09 +00:00
actions.js feat(code): add custom rate limits for token code 2018-09-06 21:39:56 -04:00
block_reasons.js feat(ipreputation): Use IP reputation service from /check (#152), r=@vbudhram 2017-01-17 14:34:13 -05:00
dataflow.js feat(fraud-detection): Listen for DataFlow fraud detection events 2019-03-01 17:06:56 +00:00
email_record.js fix(sms): Add ability to rate-limit sms by email (#198), r=@rfk 2017-04-21 09:26:43 -04:00
ip_blocklist.js fix(blocklist): Fix use of setImmediate to work with node 8 (#220) r=@vladikoff 2017-12-20 10:44:40 -06:00
ip_blocklist_manager.js feat(blocklist): Add support to specify the block level for multiple blocklists (#167), r=@rfk 2017-02-20 09:51:21 -05:00
ip_email_record.js fix(retryAfter): Round blocking periods up instead of down. (#159), r=@vbudhram 2017-01-24 08:56:51 -05:00
ip_record.js (iprecord): ignore prior rate-limiting for account access actions 2017-06-28 05:21:01 -07:00
log.js Merge pull request #119 from mozilla/dev-deps-0720 r=vbudhram 2016-07-21 10:47:20 -04:00
newrelic.js feature(newrelic): add optional newrelic integration 2016-09-06 18:12:00 -07:00
record.js refactor(server): Extract and simplify record retreival/storage, user defined rules. 2019-03-21 12:28:56 +00:00
records.js refactor(server): Extract and simplify record retreival/storage, user defined rules. 2019-03-21 12:28:56 +00:00
reputationService.js Updates to reputation service integration (#251) r=@vladikoff 2018-06-25 18:21:48 -04:00
server.js refactor(server): Extract and simplify record retreival/storage, user defined rules. 2019-03-21 12:28:56 +00:00
sms_record.js fix(tests): Update config and testing for sms (#189) r=vladikoff 2017-03-20 19:36:07 -04:00
uid_record.js feat(server): Add uid_record and checkAuthenticated endpoint (#121) r=vladikoff,rfk 2016-08-05 10:20:29 -04:00
user_defined_rules.js refactor(server): Extract and simplify record retreival/storage, user defined rules. 2019-03-21 12:28:56 +00:00
utils.js fix(logs): preserve homogeneity of more log properties 2019-02-06 14:17:09 +00:00