Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var shortcuts = require('wilson/shortcuts'),
renderToResponse = shortcuts.renderToResponse,
getObjectOr404 = shortcuts.getObjectOr404;
// write your views here
var http = require('wilson/http'),
urls = require('wilson/urls'),
escaperoute = require('escaperoute'),
shortcuts = require('wilson/shortcuts'),
renderToResponse = shortcuts.renderToResponse,
qs = require('querystring');
exports.BaseMiddleware = {
'processRequest':function(req) {
var rootUrlConf = urls.getRoot(),
match = rootUrlConf.match(req.pathname);
req.request_middleware.push({'processRequest':function (req) {
match(req);
}});
req.attemptContinue();
},
'processException':function(req) {
var error = null;
try {
error = req.errors.shift();
} catch(err) {
var shortcuts = require('wilson/shortcuts'),
http = require('wilson/http'),
utils = require('wilson/contrib/auth/utils'),
renderToResponse = shortcuts.renderToResponse,
getObjectOr404 = shortcuts.getObjectOr404;
exports.login = function(request, kwargs) {
kwargs = kwargs || {};
var self = this,
defaults = {
redirect_key:'next',
auth_form:'auth/login.html',
};
Object.keys(defaults).forEach(function(key) {
kwargs[key] = kwargs[key] || defaults[key];
});
if(request.method == 'POST') {