Skip to content

Commit 53e6d61

Browse files
authored
Merge pull request #1 from starfishmod/Oauth1-security
Add Oauth1 to Security Scheme Object
2 parents 2373c4f + 3f93352 commit 53e6d61

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

versions/3.0.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3369,19 +3369,24 @@ animals:
33693369
#### <a name="securitySchemeObject"></a>Security Scheme Object
33703370

33713371
Allows the definition of a security scheme that can be used by the operations.
3372-
Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter) and OAuth2's common flows (implicit, password, application and access code).
3372+
Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2's common flows (implicit, password, application and access code) and Oauth1.
33733373

33743374
##### Fixed Fields
33753375
Field Name | Type | Validity | Description
33763376
---|:---:|---|---
3377-
<a name="securitySchemeType"></a>type | `string` | Any | **Required.** The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`.
3377+
<a name="securitySchemeType"></a>type | `string` | Any | **Required.** The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`, `"oauth1"`.
33783378
<a name="securitySchemeDescription"></a>description | `string` | Any | A short description for security scheme. [CommonMark syntax](http://spec.commonmark.org/) can be used for rich text representation.
33793379
<a name="securitySchemeName"></a>name | `string` | `apiKey` | **Required.** The name of the header or query parameter to be used.
33803380
<a name="securitySchemeIn"></a>in | `string` | `apiKey` | **Required.** The location of the API key. Valid values are `"query"` or `"header"`.
33813381
<a name="securitySchemeScheme"></a>scheme | `string` | `http` | **Required.** The name of the HTTP Authorization scheme to be used in the [Authorization header as defined in RFC 7235](https://tools.ietf.org/html/rfc7235#section-4.2).
33823382
<a name="securitySchemeBearerFormat"></a>bearerFormat | `string` | `http` (`"bearer"`) | A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes.
33833383
<a name="securitySchemeFlows"></a>flows | [OAuth Flows Object](#oauthFlowsObject) | `oauth2` | **Required.** An object containing configuration information for the flow types supported.
3384-
<a name="securitySchemeOpenIdConnectUrl"></a>openIdConnectUrl | `string` | `openIdConnect` | **Required.** OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL.
3384+
<a name="securitySchemeOpenIdConnectUrl"></a>openIdConnectUrl | `string` | `openIdConnect` | **Required.** OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL.
3385+
<a name="securitySchemeAuthorizationUrl"></a>authorizationUrl | `string` | `oauth1` | **Required.** Resource Owner Authorization URL to send the user to the server to authorize the request. This MUST be in the form of a URL.
3386+
<a name="securitySchemeTokenUrl"></a>tokenUrl | `string` | `oauth1` | **Required.** Token Credentials URL to obtain a set of token credentials from the server. This MUST be in the form of a URL.
3387+
<a name="securitySchemeRequestUrl"></a>requestUrl | `string` | `oauth1` | **Required.** Temporary Credentials URL to obtain a set of temporary credentials from the server. This MUST be in the form of a URL.
3388+
<a name="signatureMethod"></a>requestUrl | [`string`] | `oauth1` | A list of supported signatures used for authorization. Valid values are `"HMAC-SHA1"`, `"RSA-SHA1"`, or `"PLAINTEXT"`. Default vaule is `"HMAC-SHA1"`
3389+
33853390

33863391
This object can be extended with [Specification Extensions](#specificationExtensions).
33873392

@@ -3432,6 +3437,26 @@ type: http
34323437
scheme: bearer
34333438
bearerFormat: JWT
34343439
```
3440+
###### Oauth1 Sample
3441+
3442+
```json
3443+
{
3444+
"type": "oauth1",
3445+
"authorizationUrl": "http://example.com/api/oauth/dialog",
3446+
"tokenUrl": "http://example.com/api/oauth/token",
3447+
"requestUrl": "http://example.com/api/oauth/request",
3448+
"signatureMethod": ["RSA-SHA1"]
3449+
}
3450+
```
3451+
3452+
```yaml
3453+
type: oauth1
3454+
authorizationUrl: http://example.com/api/oauth/dialog
3455+
tokenUrl: http://example.com/api/oauth/token
3456+
requestUrl: http://example.com/api/oauth/request
3457+
signatureMethod:
3458+
- RSA-SHA1
3459+
```
34353460

34363461
###### Implicit OAuth2 Sample
34373462

0 commit comments

Comments
 (0)