Skip to content

Commit df10578

Browse files
tedepsteinRon
and
Ron
authored
Clarify the spec to allow optional or unspecified OAuth scopes (#1888)
* Referencing issue #513. Clarify the spec to accommodate OAuth schemes where scope may be unspecified (optional scope) or where scope is not used at all. * Removed the provision for default scope represented as empty string. This introduces some ambiguities in the Security Requirement Object that would need to be addressed. * For #513, adjusting language and removing examples For #513, adjusting language and removing examples as suggested by @webron. * removed unnecessary example header Co-authored-by: Ron <[email protected]>
1 parent 14761f9 commit df10578

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

versions/3.0.3.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3294,7 +3294,7 @@ Field Name | Type | Applies To | Description
32943294
<a name="oauthFlowAuthorizationUrl"></a>authorizationUrl | `string` | `oauth2` (`"implicit"`, `"authorizationCode"`) | **REQUIRED**. The authorization URL to be used for this flow. This MUST be in the form of a URL.
32953295
<a name="oauthFlowTokenUrl"></a>tokenUrl | `string` | `oauth2` (`"password"`, `"clientCredentials"`, `"authorizationCode"`) | **REQUIRED**. The token URL to be used for this flow. This MUST be in the form of a URL.
32963296
<a name="oauthFlowRefreshUrl"></a>refreshUrl | `string` | `oauth2` | The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.
3297-
<a name="oauthFlowScopes"></a>scopes | Map[`string`, `string`] | `oauth2` | **REQUIRED**. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.
3297+
<a name="oauthFlowScopes"></a>scopes | Map[`string`, `string`] | `oauth2` | **REQUIRED**. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.
32983298

32993299
This object MAY be extended with [Specification Extensions](#specificationExtensions).
33003300

@@ -3339,7 +3339,6 @@ flows:
33393339
read:pets: read your pets
33403340
```
33413341

3342-
33433342
#### <a name="securityRequirementObject"></a>Security Requirement Object
33443343

33453344
Lists the required security schemes to execute this operation.
@@ -3354,7 +3353,7 @@ When a list of Security Requirement Objects is defined on the [OpenAPI Object](#
33543353

33553354
Field Pattern | Type | Description
33563355
---|:---:|---
3357-
<a name="securityRequirementsName"></a>{name} | [`string`] | Each name MUST correspond to a security scheme which is declared in the [Security Schemes](#componentsSecuritySchemes) under the [Components Object](#componentsObject). If the security scheme is of type `"oauth2"` or `"openIdConnect"`, then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty.
3356+
<a name="securityRequirementsName"></a>{name} | [`string`] | Each name MUST correspond to a security scheme which is declared in the [Security Schemes](#componentsSecuritySchemes) under the [Components Object](#componentsObject). If the security scheme is of type `"oauth2"` or `"openIdConnect"`, then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the array MUST be empty.
33583357

33593358
##### Security Requirement Object Examples
33603359

0 commit comments

Comments
 (0)