Skip to content

Commit

Permalink
feat(security): more oauth flow types
Browse files Browse the repository at this point in the history
  • Loading branch information
kanadgupta committed Aug 28, 2024
1 parent 2560825 commit 357a4c6
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 0 deletions.
19 changes: 19 additions & 0 deletions 3.0/json/security-multiple.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,30 @@
"type": "oauth2",
"description": "An OAuth 2 security flow. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23",
"flows": {
"authorizationCode": {
"authorizationUrl": "http://example.com/oauth/dialog",
"tokenUrl": "http://example.com/oauth/token",
"scopes": {
"write:things": "Add things to your account"
}
},
"clientCredentials": {
"tokenUrl": "http://example.com/oauth/token",
"scopes": {
"write:things": "Add things to your account"
}
},
"implicit": {
"authorizationUrl": "http://example.com/oauth/dialog",
"scopes": {
"write:things": "Add things to your account"
}
},
"password": {
"tokenUrl": "http://example.com/oauth/token",
"scopes": {
"write:things": "Add things to your account"
}
}
}
},
Expand Down
19 changes: 19 additions & 0 deletions 3.0/json/security.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,30 @@
"type": "oauth2",
"description": "An OAuth 2 security flow. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23",
"flows": {
"authorizationCode": {
"authorizationUrl": "http://example.com/oauth/dialog",
"tokenUrl": "http://example.com/oauth/token",
"scopes": {
"write:things": "Add things to your account"
}
},
"clientCredentials": {
"tokenUrl": "http://example.com/oauth/token",
"scopes": {
"write:things": "Add things to your account"
}
},
"implicit": {
"authorizationUrl": "http://example.com/oauth/dialog",
"scopes": {
"write:things": "Add things to your account"
}
},
"password": {
"tokenUrl": "http://example.com/oauth/token",
"scopes": {
"write:things": "Add things to your account"
}
}
}
},
Expand Down
13 changes: 13 additions & 0 deletions 3.0/yaml/security-multiple.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,23 @@ components:
type: oauth2
description: An OAuth 2 security flow. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23
flows:
authorizationCode:
authorizationUrl: http://example.com/oauth/dialog
tokenUrl: http://example.com/oauth/token
scopes:
write:things: Add things to your account
clientCredentials:
tokenUrl: http://example.com/oauth/token
scopes:
write:things: Add things to your account
implicit:
authorizationUrl: http://example.com/oauth/dialog
scopes:
write:things: Add things to your account
password:
tokenUrl: http://example.com/oauth/token
scopes:
write:things: Add things to your account
oauth2_alternate:
type: oauth2
description: An alternate OAuth 2 security flow. Functions identially to the
Expand Down
13 changes: 13 additions & 0 deletions 3.0/yaml/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,23 @@ components:
type: oauth2
description: An OAuth 2 security flow. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-23
flows:
authorizationCode:
authorizationUrl: http://example.com/oauth/dialog
tokenUrl: http://example.com/oauth/token
scopes:
write:things: Add things to your account
clientCredentials:
tokenUrl: http://example.com/oauth/token
scopes:
write:things: Add things to your account
implicit:
authorizationUrl: http://example.com/oauth/dialog
scopes:
write:things: Add things to your account
password:
tokenUrl: http://example.com/oauth/token
scopes:
write:things: Add things to your account
oauth2_alternate:
type: oauth2
description: An alternate OAuth 2 security flow. Functions identially to the
Expand Down
19 changes: 19 additions & 0 deletions 3.1/json/security.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,30 @@
"type": "oauth2",
"description": "An OAuth 2 security flow. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#fixed-fields-23",
"flows": {
"authorizationCode": {
"authorizationUrl": "http://example.com/oauth/dialog",
"tokenUrl": "http://example.com/oauth/token",
"scopes": {
"write:things": "Add things to your account"
}
},
"clientCredentials": {
"tokenUrl": "http://example.com/oauth/token",
"scopes": {
"write:things": "Add things to your account"
}
},
"implicit": {
"authorizationUrl": "http://example.com/oauth/dialog",
"scopes": {
"write:things": "Add things to your account"
}
},
"password": {
"tokenUrl": "http://example.com/oauth/token",
"scopes": {
"write:things": "Add things to your account"
}
}
}
},
Expand Down
13 changes: 13 additions & 0 deletions 3.1/yaml/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,23 @@ components:
type: oauth2
description: An OAuth 2 security flow. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#fixed-fields-23
flows:
authorizationCode:
authorizationUrl: http://example.com/oauth/dialog
tokenUrl: http://example.com/oauth/token
scopes:
write:things: Add things to your account
clientCredentials:
tokenUrl: http://example.com/oauth/token
scopes:
write:things: Add things to your account
implicit:
authorizationUrl: http://example.com/oauth/dialog
scopes:
write:things: Add things to your account
password:
tokenUrl: http://example.com/oauth/token
scopes:
write:things: Add things to your account
oauth2_alternate:
type: oauth2
description: An alternate OAuth 2 security flow. Functions identially to the
Expand Down

0 comments on commit 357a4c6

Please sign in to comment.