             callback()
     
         User = connection.model "users", UserSchema
-    
-         # Populate user
+
         app.use (req, res, callback) ->
             authHeader = req.get "Authorization"
             return callback() unless authHeader

crypto = require "crypto"
json = require "json-output"


#### Can be configured:
#
# * __expire__ — Token expiration.

                return callback() if err or !user
                return callback() if expires.expired user.tokenExpire
    
                req.user = username: user.username
    
                callback()

        app.post "/auth-token", (req, res) ->
            errorCallback = (err, status) ->
                res.json json.error(err), status or 500
