Created
January 16, 2013 17:49
-
-
Save jakul/4549166 to your computer and use it in GitHub Desktop.
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
function validate_auth_urls(req, path, httpMethod) { | |
/* | |
* Ensure that only client API keys can access the auth urls | |
*/ | |
if (!path.startswith('/auth/')) { | |
return true | |
} | |
//req.is_client is (correctly) set by a middleware | |
return req.is_client | |
} | |
swagger.addValidator(validate_auth_urls) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment