--- swagger: '2.0' info: version: "1.0.0" title: Basic Auth Example description: | An example for how to use Basic Auth with Swagger. Server code is available [here](https://github.com/mohsen1/basic-auth-server). It's running on Heroku. **User Name and Password** * User Name: `user` * Password: `pass` host: basic-auth-server.herokuapp.com schemes: - http - https securityDefinitions: basicAuth: type: basic description: HTTP Basic Authentication. Works over `HTTP` and `HTTPS` paths: /: get: security: - basicAuth: [] responses: 200: description: Will send `Authenticated` if authentication is succesful, otherwise it will send `Unauthorized`