Skip to content

Commit 1b2b640

Browse files
authored
Merge pull request #807 from OAI/dm/security
Added bearer/JWT support and OpenIdConnect
2 parents a8f6f6d + e171472 commit 1b2b640

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

versions/3.0.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3000,10 +3000,13 @@ Supported schemes are basic authentication, an API key (either as a header or as
30003000
##### Fixed Fields
30013001
Field Name | Type | Validity | Description
30023002
---|:---:|---|---
3003-
<a name="securitySchemeType"></a>type | `string` | Any | **Required.** The type of the security scheme. Valid values are `"basic"`, `"apiKey"` or `"oauth2"`.
3003+
<a name="securitySchemeType"></a>type | `string` | Any | **Required.** The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`.
30043004
<a name="securitySchemeDescription"></a>description | `string` | Any | A short description for security scheme.
30053005
<a name="securitySchemeName"></a>name | `string` | `apiKey` | **Required.** The name of the header or query parameter to be used.
30063006
<a name="securitySchemeIn"></a>in | `string` | `apiKey` | **Required** The location of the API key. Valid values are `"query"` or `"header"`.
3007+
<a name="securitySchemeScheme"></a>scheme | `string` | `http` | **Required.** The name of the HTTP Authorization scheme to be used in the Authorization header as per RFC 7234.
3008+
<a name="securitySchemeBearerFormat"></a>bearerFormat | `string` | `http` (`"bearer"`) | A hint to the client to identify how the bearer token should be formatted.
3009+
<a name="securitySchemeOpenIdConnectUrl"></a>openIdConnectUrl | `string` | `openIdConnect` | **Required.** OpenId Connect URL to discover OAuth2 configuration values.
30073010
<a name="securitySchemeFlow"></a>flow | `string` | `oauth2` | **Required.** The flow used by the OAuth2 security scheme. Valid values are `"implicit"`, `"password"`, `"application"` or `"accessCode"`.
30083011
<a name="securitySchemeAuthorizationUrl"></a>authorizationUrl | `string` | `oauth2` (`"implicit"`, `"accessCode"`) | **Required.** The authorization URL to be used for this flow. This SHOULD be in the form of a URL.
30093012
<a name="securitySchemeTokenUrl"></a>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.
@@ -3017,12 +3020,14 @@ This object can be extended with [Specification Extensions](#specificationExtens
30173020

30183021
```json
30193022
{
3020-
"type": "basic"
3023+
"type": "scheme",
3024+
"scheme" : "basic"
30213025
}
30223026
```
30233027

30243028
```yaml
3025-
type: basic
3029+
type: http
3030+
scheme: basic
30263031
```
30273032

30283033
###### API Key Sample
@@ -3041,6 +3046,22 @@ name: api_key
30413046
in: header
30423047
```
30433048

3049+
###### JWT Bearer Sample
3050+
3051+
```json
3052+
{
3053+
"type": "scheme",
3054+
"scheme" : "bearer",
3055+
"bearerFormat" : "JWT",
3056+
}
3057+
```
3058+
3059+
```yaml
3060+
type: http
3061+
scheme: bearer
3062+
bearerFormat: JWT
3063+
```
3064+
30443065
###### Implicit OAuth2 Sample
30453066

30463067
```json

0 commit comments

Comments
 (0)