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 | 2x 2x 1x | /**
* Respond with an successful authentication response
* @param {object} res express response object
* @param {object} auth authentication result object
* @param {string} auth.token encoded token
* @param {integer} auth.expires token expiration time (epoch)
* @param {boolean} ssl flag that indicates if token must always be passed back via HTTPS
*/
function authentication (res, auth, ssl = false) {
auth.ssl = ssl
res.status(200).json(auth)
}
module.exports = authentication
|