1 Star 0 Fork 1.4K

邓建鑫/bootshiro

forked from tomsun28/bootshiro 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
postman_test_example.json 6.85 KB
一键复制 编辑 原始数据 按行查看 历史
{
"info": {
"_postman_id": "f3d38197-8051-419d-9500-77e1f074efee",
"name": "bootshiro echo",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "bootshiro-login",
"event": [
{
"listen": "prerequest",
"script": {
"id": "bf78a840-a6cd-420d-a614-d8eed4028b51",
"type": "text/javascript",
"exec": [
"",
"pm.sendRequest(\"http://localhost:8080/account/register?tokenKey=get\", function (err, response) {",
" var key = response.json().data.tokenKey;",
" var userKey = response.json().data.userKey;",
" // var tokenKey = CryptoJS.enc.Utf8.parse(key.toString()).toString();",
" console.log(userKey);",
" // var passwd = CryptoJS.AES.encrypt(\"hahahaha\",tokenKey).toString();",
" // var password = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(passwd));",
" ",
" var tokenKey = CryptoJS.enc.Utf8.parse(key);",
" var srcs = CryptoJS.enc.Utf8.parse(\"1234\");",
" ",
" var password = CryptoJS.AES.encrypt(srcs, tokenKey, {iv: tokenKey, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7});",
"",
" pm.environment.set(\"password\", password.toString());",
" pm.environment.set(\"userKey\", userKey.toString());",
" ",
" ",
"});",
"",
""
]
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "",
"value": "",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"appId\": \"tom\",\r\n \"password\": \"{{password}}\",\r\n \"methodName\": \"login\",\r\n \"userKey\": \"{{userKey}}\",\r\n \"timestamp\": \"{{$timestamp}}\"\r\n}"
},
"url": {
"raw": "http://localhost:8080/account/login",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"account",
"login"
]
}
},
"response": []
},
{
"name": "bootshiro-login-no-encrpty",
"event": [
{
"listen": "prerequest",
"script": {
"id": "bf78a840-a6cd-420d-a614-d8eed4028b51",
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "",
"value": "",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"appId\": \"tom\",\r\n \"password\": \"1234\",\r\n \"methodName\": \"login\",\r\n \"timestamp\": \"{{$timestamp}}\"\r\n}"
},
"url": {
"raw": "http://localhost:8080/account/login",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"account",
"login"
]
}
},
"response": []
},
{
"name": "bootshiro-jwt",
"request": {
"auth": {
"type": "bearer"
},
"method": "GET",
"header": [
{
"key": "authorization",
"value": "eyJhbGciOiJIUzUxMiIsInppcCI6IkRFRiJ9.eNo0ysEKwjAMANB_yXmBJk3WdH_j2hw2QWWtIgz_3Xrw-ngn7H2DBXQWqjUpVouOQiVjDuZogTIVKYXWCBO05zoyG1sKUXTI1tqQfr_6DZsfLz9-eOmwkDIpcVKawN-PPwgrfb4AAAD__w.jsD-zIXRQHLUIvwjRrsUnHkI_4unJH6JZ2zzTfUGdSh0kr0uQMmdukSPzJPlBKjqw3nbb0ysuRU5cFBxMMz_Uw"
},
{
"key": "appId",
"value": "tom"
}
],
"url": {
"raw": "http://localhost:8080/user/role/tom?",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"user",
"role",
"tom"
],
"query": [
{
"key": "jwt",
"value": "eyJhbGciOiJIUzUxMiIsInppcCI6IkRFRiJ9.eNo0ysEKwjAMANB_yXmBJk3WdH_j2hw2QWWtIgz_3Xrw-ngn7H2DBXQWqjUpVouOQiVjDuZogTIVKYXWCBO05zoyG1sKUXTI1tqQfr_6DZsfLz9-eOmwkDIpcVKawN-PPwgrfb4AAAD__w.jsD-zIXRQHLUIvwjRrsUnHkI_4unJH6JZ2zzTfUGdSh0kr0uQMmdukSPzJPlBKjqw3nbb0ysuRU5cFBxMMz_Uw",
"disabled": true
}
]
}
},
"response": []
},
{
"name": "bootshiro-register",
"event": [
{
"listen": "prerequest",
"script": {
"id": "e2075c45-db6d-436b-96cb-3ffd11b974c9",
"type": "text/javascript",
"exec": [
"",
"pm.sendRequest(\"http://localhost:8080/account/register?tokenKey=get\", function (err, response) {",
" var key = response.json().data.tokenKey;",
" var userKey = response.json().data.userKey;",
" // var tokenKey = CryptoJS.enc.Utf8.parse(key.toString()).toString();",
" console.log(userKey);",
" // var passwd = CryptoJS.AES.encrypt(\"hahahaha\",tokenKey).toString();",
" // var password = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(passwd));",
" ",
" var tokenKey = CryptoJS.enc.Utf8.parse(key);",
" var srcs = CryptoJS.enc.Utf8.parse(\"1234\");",
" ",
" var password = CryptoJS.AES.encrypt(srcs, tokenKey, {iv: tokenKey, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7});",
"",
" pm.environment.set(\"password\", password.toString());",
" pm.environment.set(\"userKey\", userKey.toString());",
" ",
" ",
"});",
"",
""
]
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"uid\": \"tom\",\r\n \"username\":\"tom\",\r\n \"password\": \"{{password}}\",\r\n \"methodName\": \"register\",\r\n \"userKey\": \"{{userKey}}\",\r\n \"timestamp\": \"{{$timestamp}}\"\r\n}"
},
"url": {
"raw": "http://localhost:8080/account/register",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"account",
"register"
]
}
},
"response": []
},
{
"name": "bootshiro-register-no-encrpty",
"event": [
{
"listen": "prerequest",
"script": {
"id": "e2075c45-db6d-436b-96cb-3ffd11b974c9",
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"uid\": \"tom33\",\r\n \"username\":\"tom33\",\r\n \"password\": \"1234\",\r\n \"methodName\": \"register\",\r\n \"timestamp\": \"{{$timestamp}}\"\r\n}"
},
"url": {
"raw": "http://localhost:8080/account/register",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"account",
"register"
]
}
},
"response": []
}
]
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/deng_jian_xin/bootshiro.git
git@gitee.com:deng_jian_xin/bootshiro.git
deng_jian_xin
bootshiro
bootshiro
master

搜索帮助