Created
November 9, 2010 19:45
-
-
Save indexzero/669679 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var journey = require('journey'); | |
function quthorize (req, body, cb) { | |
// Put auth handler in here | |
}; | |
var router = new (journey.Router)(function (map) { | |
map.path('/data', function () { | |
map.filter(function () { | |
// authorized stuff here | |
}); | |
}); | |
map.get('foo').filter().bind(function () { | |
// authorized stuff here | |
}); | |
}, { filter: authorize }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment