From 9be6e4d3f66c1b78baefdd5b8cf6dfc1f7088ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E8=89=B3=E5=85=B5?= Date: Mon, 28 Mar 2022 09:30:07 +0000 Subject: [PATCH 1/2] update Developer Guide/ReadMe.md. --- Developer Guide/ReadMe.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Developer Guide/ReadMe.md b/Developer Guide/ReadMe.md index 5cfcd07..16cebeb 100644 --- a/Developer Guide/ReadMe.md +++ b/Developer Guide/ReadMe.md @@ -86,6 +86,7 @@ Example response: ``` response 200 OK { + "userId": "xxxxx", "accessToken": "eyJhbGciOiJSUzI1NiIsInR5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } -- Gitee From 6158227a3151cd6360dfb55c803cde0085325d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E8=89=B3=E5=85=B5?= Date: Mon, 28 Mar 2022 09:45:47 +0000 Subject: [PATCH 2/2] update Projects/User Management/User_Interfaces.md. --- Projects/User Management/User_Interfaces.md | 85 +++++---------------- 1 file changed, 19 insertions(+), 66 deletions(-) diff --git a/Projects/User Management/User_Interfaces.md b/Projects/User Management/User_Interfaces.md index 760cc4e..957d176 100644 --- a/Projects/User Management/User_Interfaces.md +++ b/Projects/User Management/User_Interfaces.md @@ -18,10 +18,9 @@ User Interfaces - [2.8 启用用户](#28-启用用户) - [2.9 设置用户角色](#29-设置用户角色) - [3. IDENTITY](#3-IDENTITY) - - [3.1 获取短信验证码](#31-获取短信验证码) - - [3.2 获取邮件验证码](#32-获取邮件验证码) - - [3.3 获取图形验证码](#32-获取图形验证码) - - [3.4 预校验图形验证码正确性](#32-预校验图形验证码正确性) + - [3.1 获取邮件验证码](#32-获取邮件验证码) + - [3.2 获取图形验证码](#32-获取图形验证码) + - [3.3 预校验图形验证码正确性](#32-预校验图形验证码正确性) ## 1. AUTH @@ -38,7 +37,7 @@ Method: POST | Name | Definition |Type | Required| Describe | | ------- | ---------- |-------|---------| ---------| | verifyCode | 图形验证码 |query|是| | -| username | 用户名/邮箱/手机号 |body|是| | +| username | 用户名/邮箱 |body|是| | | password | 密码 |body|是| | Example response: @@ -61,7 +60,6 @@ response 200 OK { "username": "TestUser1", "mailAddress": "test@edgegallery.org", - "telephone": "13812345678", "createTime":"2021-02-24 04:39:23", "allowed": true, "userId": "37423702-051a-46b4-bf2b-f190759cc0b8", @@ -99,12 +97,16 @@ Method: POST ``` | Name | Definition |Type | Required| Describe | | ------- | ---------- |-------|---------| ---------| -| userFlag | 用户名/邮箱/手机号 |body|是| | +| userFlag | 用户名/邮箱 |body|是| | | password | 密码 |body|是| | Example response: ``` -response 200 OK +response 200 OK. +{ + "userId": "xxxxx", + "accessToken": "eyJhbGciOiJSUzI1NiIsInR5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +} ``` @@ -126,14 +128,12 @@ Method: POST | username | 用户名 |body|是| 必须是字母或者字母和数字的组合,必须以字母开头,长度在6~30个字符之间 | | password | 密码 |body|是| 必须满足复杂度要求,必须是数字/字母/特数字符的组合,长度在6~18个字符之间 | | mailAddress | 邮箱地址 |body|否| 如果填写,必须符合邮箱地址的格式要求 | -| telephone | 手机号码 |body|否 | 如果填写,必须为11位有效数字,且以1开头 | Example request: ```json { "username": "TestUser1", "mailAddress": "test@edgegallery.org", - "telephone": "13812345678", "password": "123.qwe" } ``` @@ -144,7 +144,6 @@ response 201 OK { "username": "TestUser1", "mailAddress": "test@edgegallery.org", - "telephone": "13812345678", "userId": "37423702-051a-46b4-bf2b-f190759cc0b8", "permissions": [ { @@ -183,7 +182,7 @@ response 500 INTERNAL ERROR (3)非guest用户密码超过90天后过期,登录后强制修改密码 -2. 如果用户注册时提供了真实的邮箱地址或手机号(也可以在个人中心填写这两项信息),可以通过邮箱或手机验证码的方式重置密码。需要开启邮件服务或短信服务才能使用。 +2. 如果用户注册时提供了真实的邮箱地址(也可以在个人中心填写该信息),可以通过邮箱重置密码。需要开启邮件服务才能使用。 ``` Resource URI: /v1/users/password @@ -194,8 +193,7 @@ Method: PUT | type | 修改密码的类型 |body|是| 1--原密码验证修改; 2--密码找回 | | newPassword | 修改后的新密码 |body|是| 必须满足复杂度要求,必须是数字/字母/特数字符的组合,长度在6~18个字符之间 | | oldPassword | 原密码 |body|否| 当type=1时必填 | -| telephone | 手机号码 |body|否| 当type=2时,且需要通过手机号找回时,填写已经注册过的手机号码。与mailAddress有效性互斥 | -| mailAddress | 邮箱地址 |body|否| 当type=2时,且需要通过邮箱找回时,填写已经注册过的邮箱地址。与telephone有效性互斥 | +| mailAddress | 邮箱地址 |body|否| 当type=2时,填写已经注册过的邮箱地址 | | verificationCode | 验证码 |body|否| 6位有效数字。当type=2时必填 | Example request: @@ -204,7 +202,6 @@ Example request: "type": 2, "newPassword": "123.qwe", "oldPassword": "", - "telephone": "", "mailAddress": "test@edgegallery.org", "verificationCode": "123456" } @@ -235,7 +232,7 @@ response 500 INTERNAL ERROR ### 2.3 校验重复用户 -判断用户名或手机号是否已经注册过,不允许重复注册。 +判断用户名、邮箱地址是否已经注册过,不允许重复注册。 ``` Resource URI: /v1/users/action/uniqueness @@ -245,14 +242,12 @@ Method: POST | --------- | ---------- |-------|---------|-------- | | username | 用户名 |body|是| 必须是字母或者字母和数字的组合,必须以字母开头,长度在6~30个字符之间 | | mailAddress | 邮箱地址 |body|否| 如果填写,必须符合邮箱地址的格式要求 | -| telephone | 手机号码 |body|否 | 如果填写,必须为11位有效数字,且以1开头| Example request: ```json { "username": "TestUser1", - "mailAddress": "test@edgegallery.org", - "telephone": "13812345678" + "mailAddress": "test@edgegallery.org" } ``` @@ -261,8 +256,7 @@ Example response: response 200 OK { "username": true or false, - "mailAddress": true or false, - "telephone": true or false + "mailAddress": true or false } ``` @@ -280,7 +274,6 @@ User: admin | --------- | ---------- |-------|---------|-------- | | username | 用户名 |body|否|用于模糊查询条件的用户名关键字 | | mailAddress| 邮箱地址 |body|否|用于模糊查询条件的邮箱地址关键字 | -| telephone| 电话号码 |body|否|用于模糊查询条件的电话号码关键字 | | role| 角色 |body|是|ALL--全部;ADMIN--管理员;TENANT--租户;GUEST--访客 | | status| 状态 |body|是|-1--全部;0--停用;1--启用 | | createTimeBegin| 创建时间(即注册时间)范围--起始 |body|否|起始时间,格式:2021-1-21 | @@ -296,7 +289,6 @@ Example request: { "username": "", "mailAddress": "", - "telephone": "", "role": "", "status": -1, "createTimeBegin": "2021-1-21", @@ -319,7 +311,6 @@ response 200 OK { "username": "TestUser1", "mailAddress": "test@edgegallery.org", - "telephone": "13812345678", "userId": "37423702-051a-46b4-bf2b-f190759cc0b8", "permissions": [ { @@ -400,14 +391,12 @@ Method: PUT | userId | 用户ID | path | 是 |uuid | | username | 用户名 |body|是| 必须是字母或者字母和数字的组合,必须以字母开头,长度在6~30个字符之间 | | mailAddress | 邮箱地址 |body|否| 如果填写,必须符合邮箱地址的格式要求 | -| telephone | 手机号码 |body|否 | 如果填写,必须为11位有效数字,且以1开头| Example request: ```json { "username": "TestUser1", - "mailAddress": "test@edgegallery.org", - "telephone": "13812345678" + "mailAddress": "test@edgegallery.org" } ``` @@ -417,7 +406,6 @@ response 200 OK { "username": "TestUser1", "mailAddress": "test@edgegallery.org", - "telephone": "13812345678", "userId": "37423702-051a-46b4-bf2b-f190759cc0b8", "permissions": [ { @@ -557,42 +545,7 @@ response 403 FORBIDDEN ## 3 IDENTITY -### 3.1 获取短信验证码 - -发送验证码到指定的手机号上,发送成功返回200,发送失败返回417。 - -发送短信验证码前需要先获取图形验证码,通过verifyCode参数传递。 - -``` -Resource URI: /v1/identity/sms -Method: POST -``` -| Name | Definition |Type | Required|Describe | -| ------------- | ---------- | ------- | --------- | -------- | -| verifyCode | 图形验证码 |query|是| | -| telephone | 电话号码 |body|是|11位有效数字,必须以1开头 | - - -Example request: -```json -{ - "telephone": "15191881159" -} -``` - -Example response: -```json -response 200 OK - -response 417 Expectation Failed -{ - "code": 0, - "message": "string" -} - -``` - -### 3.2 获取邮件验证码 +### 3.1 获取邮件验证码 发送验证码到指定的邮箱,发送成功返回200,发送失败返回417。 @@ -631,7 +584,7 @@ response 417 Expectation Failed } ``` -### 3.3 获取图形验证码 +### 3.2 获取图形验证码 获取带验证码的图片数据流 @@ -643,7 +596,7 @@ Method: GET - 该接口不带任何请求参数,返回二进制的图片数据流 - 验证码3分钟内有效 -### 3.4 预校验图形验证码正确性 +### 3.3 预校验图形验证码正确性 预校验用户输入的验证码是否正确 -- Gitee