Initial commit
This commit is contained in:
362
reference/goedge 文档/UserIdentityService.md
Normal file
362
reference/goedge 文档/UserIdentityService.md
Normal file
@@ -0,0 +1,362 @@
|
||||
# UserIdentityService
|
||||
> 用户实名认证服务
|
||||
|
||||
---
|
||||
|
||||
## cancelUserIdentity
|
||||
> 取消提交实名审核认证信息
|
||||
|
||||
- 角色:`user`
|
||||
- HTTP:`POST https://backend.dooki.cloud/UserIdentityService/cancelUserIdentity`
|
||||
- RPC:`rpc cancelUserIdentity(CancelUserIdentityRequest) returns (RPCSuccess);`
|
||||
|
||||
**请求对象 (`CancelUserIdentityRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"userIdentityId": "int64"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`RPCSuccess`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/UserIdentityService/cancelUserIdentity" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## checkUserIdentityIsSubmitted
|
||||
> 检查是否正在审核中
|
||||
|
||||
- 角色:`admin`
|
||||
- HTTP:`POST https://backend.dooki.cloud/UserIdentityService/checkUserIdentityIsSubmitted`
|
||||
- RPC:`rpc checkUserIdentityIsSubmitted(CheckUserIdentityIsSubmittedRequest) returns (CheckUserIdentityIsSubmittedResponse);`
|
||||
|
||||
**请求对象 (`CheckUserIdentityIsSubmittedRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"userId": "int64 // 用户ID"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`CheckUserIdentityIsSubmittedResponse`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"isSubmitted": "bool"
|
||||
}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/UserIdentityService/checkUserIdentityIsSubmitted" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## createUserIdentity
|
||||
> 创建实名认证信息
|
||||
|
||||
- 角色:`user`
|
||||
- HTTP:`POST https://backend.dooki.cloud/UserIdentityService/createUserIdentity`
|
||||
- RPC:`rpc createUserIdentity(CreateUserIdentityRequest) returns (CreateUserIdentityResponse);`
|
||||
|
||||
**请求对象 (`CreateUserIdentityRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"orgType": "string",
|
||||
"type": "string",
|
||||
"realName": "string",
|
||||
"number": "string",
|
||||
"fileIds": "[]int64"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`CreateUserIdentityResponse`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"userIdentityId": "int64"
|
||||
}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/UserIdentityService/createUserIdentity" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## findEnabledUserIdentity
|
||||
> 查找单个实名认证信息
|
||||
|
||||
- 角色:`admin`, `user`
|
||||
- HTTP:`POST https://backend.dooki.cloud/UserIdentityService/findEnabledUserIdentity`
|
||||
- RPC:`rpc findEnabledUserIdentity(FindEnabledUserIdentityRequest) returns (FindEnabledUserIdentityResponse);`
|
||||
|
||||
**请求对象 (`FindEnabledUserIdentityRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"userIdentityId": "int64"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`FindEnabledUserIdentityResponse`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"userIdentity": "UserIdentity"
|
||||
}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/UserIdentityService/findEnabledUserIdentity" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## findEnabledUserIdentityWithOrgType
|
||||
> 查看某个类型的实名认证信息
|
||||
|
||||
- 角色:`admin`, `user`
|
||||
- HTTP:`POST https://backend.dooki.cloud/UserIdentityService/findEnabledUserIdentityWithOrgType`
|
||||
- RPC:`rpc findEnabledUserIdentityWithOrgType(FindEnabledUserIdentityWithOrgTypeRequest) returns (FindEnabledUserIdentityWithOrgTypeResponse);`
|
||||
|
||||
**请求对象 (`FindEnabledUserIdentityWithOrgTypeRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"userId": "int64 // 用户端不需要设置此参数",
|
||||
"orgType": "string // 阻止类型"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`FindEnabledUserIdentityWithOrgTypeResponse`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"userIdentity": "UserIdentity"
|
||||
}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/UserIdentityService/findEnabledUserIdentityWithOrgType" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## rejectUserIdentity
|
||||
> 拒绝用户实名认证信息
|
||||
|
||||
- 角色:`admin`
|
||||
- HTTP:`POST https://backend.dooki.cloud/UserIdentityService/rejectUserIdentity`
|
||||
- RPC:`rpc rejectUserIdentity(RejectUserIdentityRequest) returns (RPCSuccess);`
|
||||
|
||||
**请求对象 (`RejectUserIdentityRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"userIdentityId": "int64",
|
||||
"reason": "string"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`RPCSuccess`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/UserIdentityService/rejectUserIdentity" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## resetUserIdentity
|
||||
> 重置用户实名认证信息
|
||||
|
||||
- 角色:`admin`
|
||||
- HTTP:`POST https://backend.dooki.cloud/UserIdentityService/resetUserIdentity`
|
||||
- RPC:`rpc resetUserIdentity(ResetUserIdentityRequest) returns (RPCSuccess);`
|
||||
|
||||
**请求对象 (`ResetUserIdentityRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"userIdentityId": "int64"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`RPCSuccess`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/UserIdentityService/resetUserIdentity" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## submitUserIdentity
|
||||
> 提交审核实名认证信息
|
||||
|
||||
- 角色:`user`
|
||||
- HTTP:`POST https://backend.dooki.cloud/UserIdentityService/submitUserIdentity`
|
||||
- RPC:`rpc submitUserIdentity(SubmitUserIdentityRequest) returns (RPCSuccess);`
|
||||
|
||||
**请求对象 (`SubmitUserIdentityRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"userIdentityId": "int64"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`RPCSuccess`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/UserIdentityService/submitUserIdentity" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## updateUserIdentity
|
||||
> 修改实名认证信息
|
||||
|
||||
- 角色:`user`
|
||||
- HTTP:`POST https://backend.dooki.cloud/UserIdentityService/updateUserIdentity`
|
||||
- RPC:`rpc updateUserIdentity(UpdateUserIdentityRequest) returns (RPCSuccess);`
|
||||
|
||||
**请求对象 (`UpdateUserIdentityRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"userIdentityId": "int64",
|
||||
"type": "string",
|
||||
"realName": "string",
|
||||
"number": "string",
|
||||
"fileIds": "[]int64"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`RPCSuccess`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/UserIdentityService/updateUserIdentity" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## verifyUserIdentity
|
||||
> 通过用户实名认证信息
|
||||
|
||||
- 角色:`admin`
|
||||
- HTTP:`POST https://backend.dooki.cloud/UserIdentityService/verifyUserIdentity`
|
||||
- RPC:`rpc verifyUserIdentity(VerifyUserIdentityRequest) returns (RPCSuccess);`
|
||||
|
||||
**请求对象 (`VerifyUserIdentityRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"userIdentityId": "int64"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`RPCSuccess`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/UserIdentityService/verifyUserIdentity" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user