Support paired security requirements - e.g. basic and apiKey

This commit is contained in:
domaindrivendev
2017-08-21 01:07:47 -07:00
parent d91601b02c
commit ad9cd5de66
8 changed files with 155 additions and 38 deletions

View File

@@ -9,7 +9,7 @@
"post": {
"summary": "Authenticates with basic auth",
"tags": [
"Auth Test"
"Auth Tests"
],
"operationId": "testBasicAuth",
"security": [
@@ -29,6 +29,57 @@
}
}
},
"/auth-tests/api-key": {
"post": {
"summary": "Authenticates with an api key",
"tags": [
"Auth Tests"
],
"operationId": "testApiKey",
"security": [
{
"api_key": [
]
}
],
"responses": {
"204": {
"description": "Valid credentials"
},
"401": {
"description": "Invalid credentials"
}
}
}
},
"/auth-tests/basic-and-api-key": {
"post": {
"summary": "Authenticates with basic auth and api key",
"tags": [
"Auth Tests"
],
"operationId": "testBasicAndApiKey",
"security": [
{
"basic_auth": [
],
"api_key": [
]
}
],
"responses": {
"204": {
"description": "Valid credentials"
},
"401": {
"description": "Invalid credentials"
}
}
}
},
"/blogs": {
"post": {
"summary": "Creates a blog",
@@ -149,7 +200,7 @@
}
],
"put": {
"summary": "upload a blog thumbnail",
"summary": "Uploads a blog thumbnail",
"tags": [
"Blogs"
],
@@ -226,12 +277,5 @@
"name": "api_key",
"in": "query"
}
},
"security": [
{
"api_key": [
]
}
]
}
}