Skip to content

Commit

Permalink
docs: Add a description of the insufficient_scope returned by callso …
Browse files Browse the repository at this point in the history
…the OAuth Interface. (#1278)

* docs: Add a description of the insufficient_scope returned by calls to the OAuth Interface.

* Update taptap-oauth.mdx

* Update taptap-oauth.mdx

* Update taptap-oauth.mdx
  • Loading branch information
WatchMan-Wang authored Nov 13, 2024
1 parent 0c712aa commit aaea068
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions cn/docs/sdk/taptap-login/taptap-oauth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1244,4 +1244,5 @@ curl -s -H"Authorization:${AUTHORIZATION}" "https://${REQUEST_HOST}${REQUEST_URI
| forbidden | 用户没有对当前动作的权限,**引导重新身份验证并不能提供任何帮助,而且这个请求也不应该被重复提交** |
| not_found | 请求失败,请求所希望得到的资源未被在服务器上发现。**在参数相同的情况下,不应该重复请求** |
| server_error | 服务器出现异常情况 **可稍等后重新尝试请求,但需有尝试上限,建议最多 3 次,如一直失败,则中断并告知用户** |
| insufficient_scope | 移动端进行 TapTap 授权使用的授权范围与服务端调用的 OAuth 接口不匹配导致,例如:移动端授权采用 basic_info 权限而服务端调用 `获取当前账户基础信息` API 时则会返回该异常 |

Original file line number Diff line number Diff line change
Expand Up @@ -1244,4 +1244,6 @@ curl -s -H"Authorization:${AUTHORIZATION}" "https://${REQUEST_HOST}${REQUEST_URI
| forbidden | 用户没有对当前动作的权限,**引导重新身份验证并不能提供任何帮助,而且这个请求也不应该被重复提交** |
| not_found | 请求失败,请求所希望得到的资源未被在服务器上发现。**在参数相同的情况下,不应该重复请求** |
| server_error | 服务器出现异常情况 **可稍等后重新尝试请求,但需有尝试上限,建议最多 3 次,如一直失败,则中断并告知用户** |
| insufficient_scope | 移动端进行 TapTap 授权使用的授权范围与服务端调用的 OAuth 接口不匹配导致,例如:移动端授权采用 basic_info 权限而服务端调用 `获取当前账户基础信息` API 时则会返回该异常 |


2 changes: 2 additions & 0 deletions hk/docs/sdk/taptap-login/taptap-oauth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1243,4 +1243,6 @@ curl -s -H"Authorization:${AUTHORIZATION}" "https://${REQUEST_HOST}${REQUEST_URI
| forbidden | 用户没有对当前动作的权限,**引导重新身份验证并不能提供任何帮助,而且这个请求也不应该被重复提交** |
| not_found | 请求失败,请求所希望得到的资源未被在服务器上发现。**在参数相同的情况下,不应该重复请求** |
| server_error | 服务器出现异常情况 **可稍等后重新尝试请求,但需有尝试上限,建议最多 3 次,如一直失败,则中断并告知用户** |
| insufficient_scope | 移动端进行 TapTap 授权使用的授权与服务端调用的 OAuth 接口不匹配导致,例如:移动端授权采用 basic_info 权限而服务端调用 `获取当前账户基础信息` API 时则会返回该异常 |


Original file line number Diff line number Diff line change
Expand Up @@ -1235,3 +1235,4 @@ curl -s -H"Authorization:${AUTHORIZATION}" "https://${REQUEST_HOST}${REQUEST_URI
| forbidden | The user does not have permission for the current action, **guiding re-authentication will not help, and this request should not be resubmitted** |
| not_found | The request failed, the requested resource was not found on the server. **Under the same parameters, the request should not be repeated** |
| server_error | An exception occurred on the server **Retry the request after a while, but there should be a retry limit, recommended maximum of 3 times, if it keeps failing, interrupt and inform the user** |
| insufficient_scope | The permission used for TapTap authorisation on the mobile side does not match the OAuth interface called by the server side, e.g. if the mobile side uses the basic_info permission for authorisation and the server side calls the `Get Current Account Detailed Information' API, then this exception is returned. |
Original file line number Diff line number Diff line change
Expand Up @@ -596,3 +596,5 @@ public class Authorization {
| forbidden        | User does not have permission to perform this action. **Reauthenticating permission will not provide any help. This request should be not repeated.** |
| not_found        | Request failed. The requested resources were not found on the server. **Requests should not be repeated with the same parameters** |
| server_error    | The server error has occurred.  **You may retry the request later, but there must be an upper limit (recommended: 3). If the first attempt fails, interrupt and inform the user** | 
| insufficient_scope | The permission used for TapTap authorisation on the mobile side does not match the OAuth interface called by the server side, e.g. if the mobile side uses the basic_info permission for authorisation and the server side calls the `Get Current Account Detailed Information' API, then this exception is returned. |

Original file line number Diff line number Diff line change
Expand Up @@ -1245,4 +1245,6 @@ curl -s -H"Authorization:${AUTHORIZATION}" "https://${REQUEST_HOST}${REQUEST_URI
| forbidden | 用户没有对当前动作的权限,**引导重新身份验证并不能提供任何帮助,而且这个请求也不应该被重复提交** |
| not_found | 请求失败,请求所希望得到的资源未被在服务器上发现。**在参数相同的情况下,不应该重复请求** |
| server_error | 服务器出现异常情况 **可稍等后重新尝试请求,但需有尝试上限,建议最多 3 次,如一直失败,则中断并告知用户** |
| insufficient_scope | 移动端进行 TapTap 授权使用的授权范围与服务端调用的 OAuth 接口不匹配导致,例如:移动端授权采用 basic_info 权限而服务端调用 `获取当前账户基础信息` API 时则会返回该异常 |


0 comments on commit aaea068

Please sign in to comment.