OAuth Flows 对象
允许配置支持的 OAuth Flows。
固定字段
字段名 | 类型 | 描述 |
---|---|---|
implicit | OAuth Flow 对象 | OAuth Implicit flow 的配置 |
password | OAuth Flow 对象 | OAuth Resource Owner Password flow 的配置 |
clientCredentials | OAuth Flow 对象 | OAuth Client Credentials flow 的配置。在 OpenAPI 2.0 中曾被称作 application 。 |
authorizationCode | OAuth Flow 对象 | OAuth Authorization Code flow 的配置。在 OpenAPI 2.0 中曾被称作 accessCode 。 |
这个对象可能会被规范扩展扩展。
OAuth Flow 对象
支持的 OAuth Flow 的配置详情。
固定字段
这个对象可能会被规范扩展扩展。
OAuth Flow 对象示例
{
"type": "oauth2",
"flows": {
"implicit": {
"authorizationUrl": "https://example.com/api/oauth/dialog",
"scopes": {
"write:pets": "modify pets in your account",
"read:pets": "read your pets"
}
},
"authorizationCode": {
"authorizationUrl": "https://example.com/api/oauth/dialog",
"tokenUrl": "https://example.com/api/oauth/token",
"scopes": {
"write:pets": "modify pets in your account",
"read:pets": "read your pets"
}
}
}
}
type: oauth2
flows:
implicit:
authorizationUrl: https://example.com/api/oauth/dialog
scopes:
write:pets: modify pets in your account
read:pets: read your pets
authorizationCode:
authorizationUrl: https://example.com/api/oauth/dialog
tokenUrl: https://example.com/api/oauth/token
scopes:
write:pets: modify pets in your account
read:pets: read your pets