Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide API Methods until API Key is provided and/or validated #11

Open
metasection opened this issue Oct 6, 2014 · 8 comments
Open

Hide API Methods until API Key is provided and/or validated #11

metasection opened this issue Oct 6, 2014 · 8 comments

Comments

@metasection
Copy link

I need to hide "protected" API methods from the Swagger UI until the API Key is provided. It would be great if there was some meta data defined on each route that said whether the route was public or protected. Public meaning "No API Key". Protected meaning "API Key present and validated".

It would be awesome if "protected" could be tied to a callback function. This would allow our application to define specific behavior based on the API Key configuration. We may offer Pro features of the application and don't want to show these API methods to Standard users.

@metasection
Copy link
Author

Any feedback on this issue and the Pull Request?

@metasection
Copy link
Author

Could you please comment on this issue and Pull Request?

If you don't like the changes, we can create a separate module.

If you want something more, we can add.

If you are just too busy, please let us know.

Best regards.

@z0mt3c
Copy link
Owner

z0mt3c commented Nov 14, 2014

Sorry for the delay. Find my answer in the pull request.

@metasection
Copy link
Author

New Pull Request submitted. Per your request, I have removed the inline require and added tests. The remaining tests require an actual http GET. Do you have a preference for how this is done inside the tests?

@metasection
Copy link
Author

Any feedback on pull request #16?

@metasection
Copy link
Author

Any feedback? Need anything else before you can Pull?

@metasection
Copy link
Author

Any feedback on pull request #16?

@metasection
Copy link
Author

Completely reworked my updates based on your feedback. The changes to the module are minimal. I have added support for the 'authorizations' property of the route and the ability to call a third party authorizations plug-in which I will upload to Github shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants