Skip to content

Update security.md #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions specification/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ info:
and requesting the state of the board or of individual squares.
version: 1.0.0
security:
defaultApiKey: []
- defaultApiKey: []
paths:
/board:
get:
security:
defaultApiKey: []
- defaultApiKey: []
```

This method of referencing Security Scheme objects is valid for all types. The array shown as the value of `defaultApiKey` above is populated for OAuth Flow and OpenID Connect objects, which have some additional features that are discussed below. An empty array is provided in all other cases.
Expand Down Expand Up @@ -139,14 +139,14 @@ info:
and requesting the state of the board or of individual squares.
version: 1.0.0
security:
oauth2Profiles:
- oauth2Profiles:
- board:read
- board:write
paths:
/board:
get:
security:
oauth2Profiles: []
- oauth2Profiles: []
```

Note that if you want to segregate grant types - where, for example, Client Credentials is only supported for a specific Operation - you'll need to create a separate Security Scheme object that can be applied individually. This is also true if you want to differentiate the available scopes, for example:
Expand Down Expand Up @@ -185,15 +185,15 @@ paths:
/board:
get:
security:
app2AppOauth:
- board:read
- app2AppOauth:
- board:read
...
/board/{row}/{column}:
put:
security:
user2AppOauth:
- board:read
- board:write
- user2AppOauth:
- board:read
- board:write
...
```

Expand Down Expand Up @@ -226,7 +226,7 @@ info:
and requesting the state of the board or of individual squares.
version: 1.0.0
security:
openIdConnect:
- openIdConnect:
- board:read
- board:write
```
Expand Down