It would be cool to support locking down access to the swagger doc using basic auth. This functionality is supported in other swagger ui gems as well as projects like resque web.
Here is an example implementation from another swagger gem.
Then we can configure the credentials inside an initializer as well.
# from https://github.com/batdevis/swagger_engine#basic-http-auth
SwaggerEngine.configure do |config|
config.admin_username = ENV['ADMIN_USERNAME']
config.admin_password = ENV['ADMIN_PASSWORD']
end
It would be cool to support locking down access to the swagger doc using basic auth. This functionality is supported in other swagger ui gems as well as projects like resque web.
Here is an example implementation from another swagger gem.
https://github.com/batdevis/swagger_engine/blob/master/app/controllers/swagger_engine/application_controller.rb
Then we can configure the credentials inside an initializer as well.
Thanks for putting this together!