部分更新 OAuth2 应用,所有字段可选,仅更新传入的字段。redirect_uris 规则:1~10 个;必须是绝对 URL;仅允许 https,http 仅限回环地址(localhost/127.0.0.1/::1);不得包含 fragment(#);不得重复。修改 client_type:由 public 改为 confidential 时会生成新 client_secret 并在本次响应中返回(仅一次);由 confidential 改为 public 时清空 client_secret。注意:homepage 字段虽可传入并会做 URL 格式校验,但当前实现不会保存(不生效)。
鉴权:需要用户 JWT(Authorization: Bearer )
OAuth2:不允许使用 OAuth2 Access Token 调用
错误响应:
| code | msg |
|---|---|
| 401 | authorization header is missing |
| 401 | authorization header format must be Bearer {token} |
| 401 | invalid token |
| 401 | token has been revoked |
| 503 | token validation temporarily unavailable |
| 403 | 此接口不支持OAuth2访问 |
| 400 | 请求参数错误: <校验错误详情> |
| 400 | 无效的应用ID |
| 404 | 应用不存在 |
| 400 | 重定向URI不合法: <具体原因,同创建接口> |
| 500 | 获取应用失败 |
| 500 | 序列化重定向URI失败 |
| 500 | 生成客户端密钥失败 |
| 500 | 更新应用失败 |