Created
October 17, 2017 09:24
-
-
Save BrunoBernardino/dbd7593fd6fe1251f924daedc6451962 to your computer and use it in GitHub Desktop.
Webtask for api-query auth
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
module.exports = function(context, cb) { | |
if (!context.query.apiKey) { | |
return cb(401, 'Unauthorized'); | |
} | |
cb(null, { | |
authenticated: true, | |
user: 'Zapier', | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment