Class: AuthController

AuthController

new AuthController(db)

REST API - Authentication controller. Provides authentication and authorization of users.

Parameters:
Name Type Description
db Connection
Source:
  • app/controllers/AuthController.js, line 13

Methods

login(req, res, next)

POST /api/auth/login Login and authorization.

Parameters:
Name Type Description
req
res
next
Source:
  • app/controllers/AuthController.js, line 27

logout(req, res, next)

POST /api/auth/logout Logout.

Parameters:
Name Type Description
req
res
next
Source:
  • app/controllers/AuthController.js, line 74