You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

286 lines
7.5 KiB

2 years ago
  1. {
  2. "info": {
  3. "_postman_id": "4d61085d-8340-4bf6-880c-15a4185fd915",
  4. "name": "FEBS-Cloud",
  5. "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  6. },
  7. "item": [
  8. {
  9. "name": "1. 密码模式获取令牌",
  10. "request": {
  11. "auth": {
  12. "type": "noauth"
  13. },
  14. "method": "POST",
  15. "header": [
  16. {
  17. "description": "客户端凭证,值的格式为Basic空格 + client_id:client_secret经过Base64加密后的值",
  18. "key": "Authorization",
  19. "type": "text",
  20. "value": "Basic ZmViczoxMjM0NTY="
  21. }
  22. ],
  23. "url": {
  24. "raw": "http://localhost:8301/auth/oauth/token?grant_type=password&username=mrbird&password=1234qwer&key=1234&code=8873",
  25. "protocol": "http",
  26. "host": [
  27. "localhost"
  28. ],
  29. "port": "8301",
  30. "path": [
  31. "auth",
  32. "oauth",
  33. "token"
  34. ],
  35. "query": [
  36. {
  37. "key": "grant_type",
  38. "value": "password",
  39. "description": "认证类型,password密码模式"
  40. },
  41. {
  42. "key": "username",
  43. "value": "mrbird",
  44. "description": "用户名"
  45. },
  46. {
  47. "key": "password",
  48. "value": "1234qwer",
  49. "description": "密码"
  50. },
  51. {
  52. "key": "key",
  53. "value": "1234",
  54. "description": "代表每个验证码的唯一key"
  55. },
  56. {
  57. "key": "code",
  58. "value": "8873",
  59. "description": "验证码值(验证码的值可以通过浏览器访问http://localhost:8301/auth/captcha?key=1234获取)"
  60. }
  61. ]
  62. }
  63. },
  64. "response": []
  65. },
  66. {
  67. "name": "2. 刷新令牌",
  68. "request": {
  69. "method": "POST",
  70. "header": [
  71. {
  72. "key": "Authorization",
  73. "value": "Basic ZmViczoxMjM0NTY=",
  74. "description": "客户端凭证,值的格式为Basic空格 + client_id:client_secret经过Base64加密后的值",
  75. "type": "text"
  76. }
  77. ],
  78. "url": {
  79. "raw": "localhost:8301/auth/oauth/token?grant_type=refresh_token&refresh_token=5d2dd6c3-bd99-4558-b622-bf8612d7c4fb",
  80. "host": [
  81. "localhost"
  82. ],
  83. "port": "8301",
  84. "path": [
  85. "auth",
  86. "oauth",
  87. "token"
  88. ],
  89. "query": [
  90. {
  91. "key": "grant_type",
  92. "value": "refresh_token"
  93. },
  94. {
  95. "key": "refresh_token",
  96. "value": "5d2dd6c3-bd99-4558-b622-bf8612d7c4fb"
  97. }
  98. ]
  99. }
  100. },
  101. "response": []
  102. },
  103. {
  104. "name": "3. feign测试",
  105. "request": {
  106. "method": "GET",
  107. "header": [
  108. {
  109. "key": "Authorization",
  110. "value": "bearer 4597893b-4ab3-468d-baa2-6ae0faf8ae9e",
  111. "equals": true,
  112. "description": "值格式:bearer空格+访问令牌"
  113. }
  114. ],
  115. "url": {
  116. "raw": "localhost:8301/test/user/list",
  117. "host": [
  118. "localhost"
  119. ],
  120. "port": "8301",
  121. "path": [
  122. "test",
  123. "user",
  124. "list"
  125. ]
  126. }
  127. },
  128. "response": []
  129. },
  130. {
  131. "name": "4. 通过febsutil获取在线用户信息",
  132. "request": {
  133. "method": "GET",
  134. "header": [
  135. {
  136. "description": "值格式:bearer空格+访问令牌",
  137. "equals": true,
  138. "key": "Authorization",
  139. "value": "bearer 684d687c-5d10-48fd-a58d-8484896cf9f6"
  140. }
  141. ],
  142. "url": {
  143. "raw": "localhost:8301/test/user",
  144. "host": [
  145. "localhost"
  146. ],
  147. "port": "8301",
  148. "path": [
  149. "test",
  150. "user"
  151. ]
  152. }
  153. },
  154. "response": []
  155. },
  156. {
  157. "name": "5. 分布式事务测试",
  158. "request": {
  159. "method": "GET",
  160. "header": [
  161. {
  162. "description": "值格式:bearer空格+访问令牌",
  163. "key": "Authorization",
  164. "type": "text",
  165. "value": "bearer 41171c4d-5b22-41d3-bb41-cb08564b2373"
  166. }
  167. ],
  168. "url": {
  169. "raw": "localhost:8301/test/pay?goodsId=1&goodsName=iPhone SE",
  170. "host": [
  171. "localhost"
  172. ],
  173. "port": "8301",
  174. "path": [
  175. "test",
  176. "pay"
  177. ],
  178. "query": [
  179. {
  180. "key": "goodsId",
  181. "value": "1",
  182. "description": "商品ID"
  183. },
  184. {
  185. "key": "goodsName",
  186. "value": "iPhone SE",
  187. "description": "商品名称"
  188. }
  189. ]
  190. }
  191. },
  192. "response": []
  193. },
  194. {
  195. "name": "6. 授权码模式获取令牌",
  196. "request": {
  197. "auth": {
  198. "type": "noauth"
  199. },
  200. "method": "POST",
  201. "header": [
  202. {
  203. "description": "客户端凭证,值的格式为Basic空格 + client_id:client_secret经过Base64加密后的值",
  204. "key": "Authorization",
  205. "type": "text",
  206. "value": "Basic Y29kZToxMjM0NTY="
  207. }
  208. ],
  209. "url": {
  210. "raw": "http://localhost:8301/auth/oauth/token?grant_type=authorization_code&code=HLapQA&redirect_uri=http://www.baidu.com",
  211. "protocol": "http",
  212. "host": [
  213. "localhost"
  214. ],
  215. "port": "8301",
  216. "path": [
  217. "auth",
  218. "oauth",
  219. "token"
  220. ],
  221. "query": [
  222. {
  223. "key": "grant_type",
  224. "value": "authorization_code",
  225. "description": "认证类型,authorization_code授权码模式"
  226. },
  227. {
  228. "key": "code",
  229. "value": "HLapQA",
  230. "description": "授权码"
  231. },
  232. {
  233. "key": "redirect_uri",
  234. "value": "http://www.baidu.com",
  235. "description": "重定向地址"
  236. }
  237. ]
  238. }
  239. },
  240. "response": []
  241. },
  242. {
  243. "name": "7. 客户端模式获取令牌",
  244. "request": {
  245. "auth": {
  246. "type": "noauth"
  247. },
  248. "method": "POST",
  249. "header": [
  250. {
  251. "description": "客户端凭证,值的格式为Basic空格 + client_id:client_secret经过Base64加密后的值",
  252. "key": "Authorization",
  253. "type": "text",
  254. "value": "Basic Y29kZToxMjM0NTY="
  255. }
  256. ],
  257. "url": {
  258. "raw": "http://localhost:8301/auth/oauth/token?grant_type=client_credentials&client=code",
  259. "protocol": "http",
  260. "host": [
  261. "localhost"
  262. ],
  263. "port": "8301",
  264. "path": [
  265. "auth",
  266. "oauth",
  267. "token"
  268. ],
  269. "query": [
  270. {
  271. "key": "grant_type",
  272. "value": "client_credentials",
  273. "description": "认证类型,client_credentials客户端模式"
  274. },
  275. {
  276. "key": "client",
  277. "value": "code",
  278. "description": "客户端client_id"
  279. }
  280. ]
  281. }
  282. },
  283. "response": []
  284. }
  285. ],
  286. "protocolProfileBehavior": {}
  287. }