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 reqresnext- Source:
- app/controllers/AuthController.js, line 27
-
logout(req, res, next)
-
POST /api/auth/logout Logout.
Parameters:
Name Type Description reqresnext- Source:
- app/controllers/AuthController.js, line 74