Created
May 24, 2015 16:16
-
-
Save OwenBrotherwood/a58ea13cf54c44ce73c5 to your computer and use it in GitHub Desktop.
pulkitsinghal audit
This file contains 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
pulkitsinghal | |
// -- Add your pre-processing middleware here -- | |
app.all('/api/*', function auditApiCalls(req, res, next) { | |
if (req.accessToken) { | |
log('url:', req.originalUrl, 'userId:', req.accessToken.id, 'token:', JSON.stringify(req.accessToken,null,0)); | |
} | |
else { | |
log('url:', req.originalUrl, 'token:', req.accessToken); | |
} | |
next(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/sloopback/00-sloopback-issues/issues/2