[HAPI-245] Adding authentication to the DatabaseService
Pre-release
Pre-release
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 APIframework from0.7.14to0.7.15inREADME.mdandpackage.json. [1] [2]
Enhancements to DBService:
- Added new configuration options to the
DBServiceconstructor, includingusername,password,useNewUrlParser,useUnifiedTopology,serverSelectionTimeoutMS,socketTimeoutMS, andauthSource. These parameters improve MongoDB connection flexibility. [1] [2] - Introduced getters for sensitive properties like
passwordto encapsulate and safely access sensitive data. - Updated the
initmethod to use the newly added MongoDB connection options, allowing for more robust and customizable database initialization.