indexzero
11/9/2010 - 7:45 PM

gistfile1.js

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 });