github.com/apremalal/vamps-core@v1.0.1-0.20161221121535-d430b56ec174/server/webapps/apieditor/spec-files/basic-auth.yaml (about)

     1  ---
     2  swagger: '2.0'
     3  info:
     4    version: "1.0.0"
     5    title: Basic Auth Example
     6    description: |
     7      An example for how to use Basic Auth with Swagger.
     8      Server code is available [here](https://github.com/mohsen1/basic-auth-server). It's running on Heroku.
     9  
    10      **User Name and Password**
    11      * User Name: `user`
    12      * Password: `pass`
    13  host: basic-auth-server.herokuapp.com
    14  schemes:
    15    - http
    16    - https
    17  securityDefinitions:
    18    basicAuth:
    19      type: basic
    20      description: HTTP Basic Authentication. Works over `HTTP` and `HTTPS`
    21  paths:
    22    /:
    23      get:
    24        security:
    25         - basicAuth: []
    26        responses:
    27          200:
    28            description:  Will send `Authenticated` if authentication is succesful, otherwise it will send `Unauthorized`