blob: e6b24a65aed8a84dfb2e3add617331b040fe29c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
---
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`
|