From e171472e999b83568a6e9ba42f675a655f81b47e Mon Sep 17 00:00:00 2001 From: Darrel Date: Sun, 2 Oct 2016 20:15:18 -0400 Subject: [PATCH] Added auth header support and OpenIdConnect --- versions/3.0.md | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/versions/3.0.md b/versions/3.0.md index f7761d43c4..120238fd56 100644 --- a/versions/3.0.md +++ b/versions/3.0.md @@ -2974,10 +2974,13 @@ Supported schemes are basic authentication, an API key (either as a header or as ##### Fixed Fields Field Name | Type | Validity | Description ---|:---:|---|--- -type | `string` | Any | **Required.** The type of the security scheme. Valid values are `"basic"`, `"apiKey"` or `"oauth2"`. +type | `string` | Any | **Required.** The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`. description | `string` | Any | A short description for security scheme. name | `string` | `apiKey` | **Required.** The name of the header or query parameter to be used. in | `string` | `apiKey` | **Required** The location of the API key. Valid values are `"query"` or `"header"`. +scheme | `string` | `http` | **Required.** The name of the HTTP Authorization scheme to be used in the Authorization header as per RFC 7234. +bearerFormat | `string` | `http` (`"bearer"`) | A hint to the client to identify how the bearer token should be formatted. +openIdConnectUrl | `string` | `openIdConnect` | **Required.** OpenId Connect URL to discover OAuth2 configuration values. flow | `string` | `oauth2` | **Required.** The flow used by the OAuth2 security scheme. Valid values are `"implicit"`, `"password"`, `"application"` or `"accessCode"`. authorizationUrl | `string` | `oauth2` (`"implicit"`, `"accessCode"`) | **Required.** The authorization URL to be used for this flow. This SHOULD be in the form of a URL. tokenUrl | `string` | `oauth2` (`"password"`, `"application"`, `"accessCode"`) | **Required.** The token URL to be used for this flow. This SHOULD be in the form of a URL. @@ -2995,12 +2998,14 @@ Field Name | Type | Description ```json { - "type": "basic" + "type": "scheme", + "scheme" : "basic" } ``` ```yaml -type: basic +type: http +scheme: basic ``` ###### API Key Sample @@ -3019,6 +3024,22 @@ name: api_key in: header ``` +###### JWT Bearer Sample + +```json +{ + "type": "scheme", + "scheme" : "bearer", + "bearerFormat" : "JWT", +} +``` + +```yaml +type: http +scheme: bearer +bearerFormat: JWT +``` + ###### Implicit OAuth2 Sample ```json