refactor the global variables as functions
This commit is contained in:
@@ -360,9 +360,11 @@ describe('Clients', function () {
|
||||
};
|
||||
|
||||
// make csrf always succeed for testing
|
||||
oauth2.csrf = function (req, res, next) {
|
||||
req.csrfToken = function () { return hat(256); };
|
||||
next();
|
||||
oauth2.csrf = function () {
|
||||
return function (req, res, next) {
|
||||
req.csrfToken = function () { return hat(256); };
|
||||
next();
|
||||
};
|
||||
};
|
||||
|
||||
function setup2(done) {
|
||||
|
||||
Reference in New Issue
Block a user