Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1x 1x 1x 2x 2x 1x | const authenticationErrorResponse = require('../templates/errors/credentials-invalid.json') const authorizationErrorResponse = require('../templates/errors/unauthorized.json') const responseHandler = require('./response-handler') /** * Respond with a authorization error response * @param {object} res express.js response object */ function authorization (req, res) { responseHandler(req, res, 200, authorizationErrorResponse) } /** * Respond with an authentication error response * @param {object} res express.js response object */ function authentication (req, res) { responseHandler(req, res, 200, authenticationErrorResponse) } module.exports = { authorization, authentication } |