Toggle navigation
Toggle navigation
This project
Loading...
Sign in
liuming
/
developer-docs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
chong
2016-12-24 17:01:32 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c2e7e64276a54837ed238182fbf33481873a07c2
c2e7e642
1 parent
aab37970
Updates 用户鉴权/README.md
Auto commit by GitBook Editor
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
34 deletions
用户鉴权/README.md
用户鉴权/README.md
View file @
c2e7e64
#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"
:
"该用户没有绑定其它用户!"
}
```
...
...
Please
register
or
login
to post a comment