Skip to content

#24 Add Authentication Middleware and Authentication APIs

JunGu Kang requested to merge #24 into development

Add authentication middleware.

  • /middlewares/auth.js

Add authentication apis.

  • GET /auth
  • POST /auth/login/trainee
  • POST /auth/login/trainer
  • POST /auth/logout

Fix trainee model.

  • Remove unnecessary fields.
  • Add before-create hook to hash password.
  • Add password hash comparison method.

Fix trainer model.

  • Add before-create hook to hash password.
  • Add password hash comparison method.

Add string resource file.

  • /resources/strings.json

Add jwt configuration to config file.

  • /config/config.json

See #24 (closed) for details.

Merge request reports

Loading