scorelab / OpenMF

An Open Source Mobile Forensics Investigation Tool for Android Platform
Apache License 2.0
150 stars 97 forks source link

[Backend] Added Class methods to User Model #104

Open amlannandy opened 3 years ago

amlannandy commented 3 years ago

Description

Added various class methods to reduce repeated code in the user routes.

  1. Method for converting user model into json format
  2. Method to match user input password with actual hashed password of that user.
  3. Moved the password hashing process from the routes to the Class constructor

Fixes #103

Type of change

How Has This Been Tested?

Try testing login, create user, get profile and get user by id routes

Test Configuration:

screen-capture (1)

Checklist: