Skip to content

Instantly share code, notes, and snippets.

View S-Stephen's full-sized avatar

S M Shorrock S-Stephen

  • University of Cambridge
  • Cambridge
View GitHub Profile
@psi-4ward
psi-4ward / LoginController.js
Created January 12, 2015 16:09
Sails.JS JWT Auth
// controllers/LoginController.js
module.exports = {
index: function(req, res) {
var email = req.param('email');
var password = req.param('password');
// delay everthing to prevent bruteforce, dos and timing attacks
setTimeout(function() {