Skip to content

[HAPI-245] Adding authentication to the DatabaseService

Pre-release
Pre-release

Choose a tag to compare

@FelipeRamosDev FelipeRamosDev released this 28 Jun 14:44
8de5250

HAPI-245 Description

This pull request introduces several updates, including a version bump for the 4Hands API framework and significant enhancements to the DBService class to provide more flexibility and configuration options for MongoDB connections. Below is a summary of the most important changes:

Version Updates:

  • Updated the version of the 4Hands API framework from 0.7.14 to 0.7.15 in README.md and package.json. [1] [2]

Enhancements to DBService:

  • Added new configuration options to the DBService constructor, including username, password, useNewUrlParser, useUnifiedTopology, serverSelectionTimeoutMS, socketTimeoutMS, and authSource. These parameters improve MongoDB connection flexibility. [1] [2]
  • Introduced getters for sensitive properties like password to encapsulate and safely access sensitive data.
  • Updated the init method to use the newly added MongoDB connection options, allowing for more robust and customizable database initialization.