chong

Updates 用户鉴权/README.md

Auto commit by GitBook Editor
#boxfish用户认证系统
# boxfish用户认证系统
####部署地址
http://114.55.58.184:8099/
#### 部署地址
####认证接口 /user/auth
[http://114.55.58.184:8099/](http://114.55.58.184:8099/)
####请求方式
POST 方法
####请求头信息
x-be-product com.boxfishedu.teacher (必须包含 teacher or student )
#### 认证接口 /user/auth
#### 请求方式
POST 方法
#### 请求头信息
x-be-product com.boxfishedu.teacher \(必须包含 teacher or student \)
#### 请求参数
- json
* json
```json
{
"username":"username",
... ... @@ -20,8 +25,10 @@ x-be-product com.boxfishedu.teacher (必须包含 teacher or student )
```
#### 返回值
- 合法用户
* 合法用户
http code 200
```json
{
"id": 7566,
... ... @@ -33,15 +40,17 @@ x-be-product com.boxfishedu.teacher (必须包含 teacher or student )
}
```
- 用户不存在
* 用户不存在
http code 404
```json
{
"msg": "用户不存在!"
}
```
- 用户密码不正确
用户密码不正确
http code 401
```json
{
... ... @@ -49,25 +58,30 @@ x-be-product com.boxfishedu.teacher (必须包含 teacher or student )
}
```
- 用户不合法 用户头信息中 和用户账号类型不匹配
* 用户不合法 用户头信息中 和用户账号类型不匹配
http code 412
```json
{
"msg":"用户不合法"
}
```
####用户信息接口 /user/me
#### 用户信息接口 /user/me
#### URL参数
* access\_token string 必须
####URL参数
- access_token string 必须
#### 请求方式
####请求方式
GET 方法
GET 方法
#### 返回值
- 合法用户
* 合法用户
http code 200
```json
{
"id": 7566,
... ... @@ -79,33 +93,40 @@ x-be-product com.boxfishedu.teacher (必须包含 teacher or student )
}
```
- accessToken 不合法
* accessToken 不合法
http code 400
``` json
```json
{
"msg": "accessToken 不合法!"
}
```
- 用户不存在
* 用户不存在
http code 404
```json
{
"msg": "用户不存在!"
}
```
####用户信息接口 /relation/user/{user_id}?access_token={access_token}
####URL参数
- user_id Long 必须
- access_token string 必须
#### 用户信息接口 /relation/user/{user\_id}?access\_token={access\_token}
#### URL参数
* user\_id Long 必须
* access\_token string 必须
####请求方式
GET 方法
#### 请求方式
GET 方法
#### 返回值
- 用户关系合法
* 用户关系合法
http code 200
```json
{
... ... @@ -119,27 +140,34 @@ x-be-product com.boxfishedu.teacher (必须包含 teacher or student )
}
}
```
- accessToken 不合法
* accessToken 不合法
http code 400
``` json
```json
{
"msg": "accessToken 不合法!"
}
```
- accessToken 过期
* accessToken 过期
http code 401
``` json
```json
{
"msg": "用户token过期!"
}
```
- 该用户没有绑定其它用户!
* 该用户没有绑定其它用户!
http code 404
```json
{
"msg": "该用户没有绑定其它用户!"
}
```
... ...