UNPKG

api-flow

Version:

A flow written in ES6 using Immutable to convert between API description formats (Swagger, etc.) and other programs such as cURL command lines.

29 lines (27 loc) 730 B
--- 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`