chong

Updates 用户鉴权/README.md

Auto commit by GitBook Editor
1 -#boxfish用户认证系统 1 +# boxfish用户认证系统
2 2
3 -####部署地址 3 +#### 部署地址
4 -http://114.55.58.184:8099/  
5 4
6 -####认证接口 /user/auth 5 +[http://114.55.58.184:8099/](http://114.55.58.184:8099/)
7 6
8 -####请求方式 7 +#### 认证接口 /user/auth
9 - POST 方法 8 +
10 -####请求头信息 9 +#### 请求方式
11 -x-be-product com.boxfishedu.teacher (必须包含 teacher or student ) 10 +
  11 +POST 方法
  12 +
  13 +#### 请求头信息
  14 +
  15 +x-be-product com.boxfishedu.teacher \(必须包含 teacher or student \)
12 16
13 #### 请求参数 17 #### 请求参数
14 -- json 18 +
  19 +* json
15 ```json 20 ```json
16 { 21 {
17 "username":"username", 22 "username":"username",
@@ -20,8 +25,10 @@ x-be-product com.boxfishedu.teacher (必须包含 teacher or student ) @@ -20,8 +25,10 @@ x-be-product com.boxfishedu.teacher (必须包含 teacher or student )
20 ``` 25 ```
21 26
22 #### 返回值 27 #### 返回值
23 -- 合法用户 28 +
  29 +* 合法用户
24 http code 200 30 http code 200
  31 +
25 ```json 32 ```json
26 { 33 {
27 "id": 7566, 34 "id": 7566,
@@ -33,15 +40,17 @@ x-be-product com.boxfishedu.teacher (必须包含 teacher or student ) @@ -33,15 +40,17 @@ x-be-product com.boxfishedu.teacher (必须包含 teacher or student )
33 } 40 }
34 ``` 41 ```
35 42
36 -- 用户不存在 43 +* 用户不存在
37 http code 404 44 http code 404
  45 +
38 ```json 46 ```json
39 { 47 {
40 "msg": "用户不存在!" 48 "msg": "用户不存在!"
41 } 49 }
42 ``` 50 ```
43 51
44 - - 用户密码不正确 52 + 用户密码不正确
  53 +
45 http code 401 54 http code 401
46 ```json 55 ```json
47 { 56 {
@@ -49,25 +58,30 @@ x-be-product com.boxfishedu.teacher (必须包含 teacher or student ) @@ -49,25 +58,30 @@ x-be-product com.boxfishedu.teacher (必须包含 teacher or student )
49 } 58 }
50 ``` 59 ```
51 60
52 -- 用户不合法 用户头信息中 和用户账号类型不匹配 61 +* 用户不合法 用户头信息中 和用户账号类型不匹配
53 http code 412 62 http code 412
  63 +
54 ```json 64 ```json
55 { 65 {
56 "msg":"用户不合法" 66 "msg":"用户不合法"
57 } 67 }
58 ``` 68 ```
59 69
60 -####用户信息接口 /user/me 70 +#### 用户信息接口 /user/me
  71 +
  72 +#### URL参数
  73 +
  74 +* access\_token string 必须
61 75
62 -####URL参数 76 +#### 请求方式
63 - - access_token string 必须  
64 77
65 -####请求方式 78 +GET 方法
66 - GET 方法  
67 79
68 #### 返回值 80 #### 返回值
69 -- 合法用户 81 +
  82 +* 合法用户
70 http code 200 83 http code 200
  84 +
71 ```json 85 ```json
72 { 86 {
73 "id": 7566, 87 "id": 7566,
@@ -79,33 +93,40 @@ x-be-product com.boxfishedu.teacher (必须包含 teacher or student ) @@ -79,33 +93,40 @@ x-be-product com.boxfishedu.teacher (必须包含 teacher or student )
79 93
80 } 94 }
81 ``` 95 ```
82 -- accessToken 不合法 96 +
  97 +* accessToken 不合法
83 98
84 http code 400 99 http code 400
85 - ``` json 100 +
  101 + ```json
86 { 102 {
87 "msg": "accessToken 不合法!" 103 "msg": "accessToken 不合法!"
88 } 104 }
89 ``` 105 ```
90 106
91 -- 用户不存在 107 +* 用户不存在
92 http code 404 108 http code 404
  109 +
93 ```json 110 ```json
94 { 111 {
95 "msg": "用户不存在!" 112 "msg": "用户不存在!"
96 } 113 }
97 ``` 114 ```
98 -####用户信息接口 /relation/user/{user_id}?access_token={access_token}  
99 115
100 -####URL参数 116 + #### 用户信息接口 /relation/user/{user\_id}?access\_token={access\_token}
101 - - user_id Long 必须 117 +
102 - - access_token string 必须 118 +#### URL参数
  119 +
  120 +* user\_id Long 必须
  121 +* access\_token string 必须
103 122
104 -####请求方式 123 +#### 请求方式
105 - GET 方法 124 +
  125 +GET 方法
106 126
107 #### 返回值 127 #### 返回值
108 -- 用户关系合法 128 +
  129 +* 用户关系合法
109 http code 200 130 http code 200
110 ```json 131 ```json
111 { 132 {
@@ -119,27 +140,34 @@ x-be-product com.boxfishedu.teacher (必须包含 teacher or student ) @@ -119,27 +140,34 @@ x-be-product com.boxfishedu.teacher (必须包含 teacher or student )
119 } 140 }
120 } 141 }
121 ``` 142 ```
122 -- accessToken 不合法 143 +* accessToken 不合法
123 144
124 http code 400 145 http code 400
125 - ``` json 146 +
  147 + ```json
126 { 148 {
127 "msg": "accessToken 不合法!" 149 "msg": "accessToken 不合法!"
128 } 150 }
129 ``` 151 ```
130 -- accessToken 过期 152 +
  153 +* accessToken 过期
131 154
132 http code 401 155 http code 401
133 - ``` json 156 +
  157 + ```json
134 { 158 {
135 "msg": "用户token过期!" 159 "msg": "用户token过期!"
136 } 160 }
137 ``` 161 ```
138 162
139 -- 该用户没有绑定其它用户! 163 +* 该用户没有绑定其它用户!
140 http code 404 164 http code 404
  165 +
141 ```json 166 ```json
142 { 167 {
143 "msg": "该用户没有绑定其它用户!" 168 "msg": "该用户没有绑定其它用户!"
144 } 169 }
145 ``` 170 ```
  171 +
  172 +
  173 +