123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562 |
- {
- "info": {
- "_postman_id": "e8b40186-1a1d-4965-be86-67b818c058dd",
- "name": "dc3-center-auth",
- "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
- },
- "item": [
- {
- "name": "Token",
- "item": [
- {
- "name": "1.生成 SALT",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "http://localhost:8300/auth/token/salt?username=pnoker",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "token",
- "salt"
- ],
- "query": [
- {
- "key": "username",
- "value": "pnoker",
- "description": "用户名,不为空"
- }
- ]
- }
- },
- "response": []
- },
- {
- "name": "2.生成 TOKEN",
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\n \"name\": \"pnoker\",\n \"password\": \"c99fa5218866e5443c7b23ea7ffe62af\"\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "http://localhost:8300/auth/token/generate",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "token",
- "generate"
- ]
- },
- "description": "**说明:**\n\n - 1.用户名/密码:pnoker/10e339be1130a90dc1b9ff0332abced6\n\n - 2.生成MD5加密之后的密码:DC3Util.md5(\"10e339be1130a90dc1b9ff0332abced6\"+\"salt\"),其中salt是第一步[1.获取SALT]中获取的\n\n---\n\n**例如:**\n\n - 1.salt是:fwl6rojy63jawkfu\n\n - 2.MD5加密之后的密码是:\"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJwbm9rZXIiLCJpc3MiOiJwbm9rZXIvZGMzLy0xIiwiaWF0IjoxNjIxODQ4MzE3LCJleHAiOjE2MjE4OTE1MTd9.ZfntzrNUtSjTiN81tODM61-2yJWhmiB8scTdD_1nT3U\""
- },
- "response": []
- },
- {
- "name": "3.校验 TOKEN 是否有效",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "http://localhost:8300/auth/token/check?username=pnoker&salt=yf08g6on1rkdksdy&token=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJwbm9rZXIiLCJpc3MiOiJwbm9rZXIvZGMzIiwiaWF0IjoxNjIxODUwMjMxLCJleHAiOjE2MjE4OTM0MzF9.utViU2yM5YpOblpmoh6fh996bdmEfFKg7p55xltp_go",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "token",
- "check"
- ],
- "query": [
- {
- "key": "username",
- "value": "pnoker",
- "description": "用户名,不为空"
- },
- {
- "key": "salt",
- "value": "yf08g6on1rkdksdy",
- "description": "salt"
- },
- {
- "key": "token",
- "value": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJwbm9rZXIiLCJpc3MiOiJwbm9rZXIvZGMzIiwiaWF0IjoxNjIxODUwMjMxLCJleHAiOjE2MjE4OTM0MzF9.utViU2yM5YpOblpmoh6fh996bdmEfFKg7p55xltp_go",
- "description": "token"
- }
- ]
- }
- },
- "response": []
- },
- {
- "name": "4.注销 TOKE",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "http://localhost:8300/auth/token/cancel?username=pnoker",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "token",
- "cancel"
- ],
- "query": [
- {
- "key": "username",
- "value": "pnoker",
- "description": "用户名,不为空"
- }
- ]
- }
- },
- "response": []
- }
- ],
- "protocolProfileBehavior": {}
- },
- {
- "name": "BlackIp",
- "item": [
- {
- "name": "1.新增 BlackIp",
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "X-Auth-Tenant-Id",
- "value": "-1",
- "description": "DC3 租户 ID",
- "type": "text"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\n \"ip\": \"127.0.0.2\",\n \"description\": \"测试黑名单Ip\"\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "http://localhost:8300/auth/black_ip/add",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "black_ip",
- "add"
- ]
- }
- },
- "response": []
- },
- {
- "name": "2.修改 BlackIp",
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "X-Auth-Tenant-Id",
- "value": "-1",
- "type": "text"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\n \"id\": 1396793287667081217,\n \"ip\": \"127.0.0.3\",\n \"enable\": false,\n \"description\": \"测试黑名单Ip\"\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "http://localhost:8300/auth/black_ip/update",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "black_ip",
- "update"
- ]
- }
- },
- "response": []
- },
- {
- "name": "3.根据 ID 查询 BlackIp",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "http://localhost:8300/auth/black_ip/id/1396793287667081217",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "black_ip",
- "id",
- "1396793287667081217"
- ]
- }
- },
- "response": []
- },
- {
- "name": "4.根据 Ip 查询 BlackIp",
- "request": {
- "method": "GET",
- "header": [
- {
- "key": "X-Auth-Tenant-Id",
- "value": "-1",
- "type": "text"
- }
- ],
- "url": {
- "raw": "http://localhost:8300/auth/black_ip/ip/127.0.0.2",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "black_ip",
- "ip",
- "127.0.0.2"
- ]
- }
- },
- "response": []
- },
- {
- "name": "5.分页查询 BlackIp",
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "X-Auth-Tenant-Id",
- "value": "-1",
- "type": "text"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\n \"ip\": \"\",\n \"page\": {\n \"current\": 1,\n \"size\": 500,\n \"orders\": [\n {\n \"column\": \"id\",\n \"asc\": false\n }\n ]\n }\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "http://localhost:8300/auth/black_ip/list",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "black_ip",
- "list"
- ]
- }
- },
- "response": []
- },
- {
- "name": "6.查询 BlackIp 是否存在并有效",
- "request": {
- "method": "GET",
- "header": [
- {
- "key": "X-Auth-Tenant-Id",
- "value": "-1",
- "type": "text"
- }
- ],
- "url": {
- "raw": "http://localhost:8300/auth/black_ip/check/127.0.0.2",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "black_ip",
- "check",
- "127.0.0.2"
- ]
- }
- },
- "response": []
- },
- {
- "name": "7.根据 ID 删除 BlackIp",
- "request": {
- "method": "POST",
- "header": [],
- "url": {
- "raw": "http://localhost:8300/auth/black_ip/delete/1396793287667081217",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "black_ip",
- "delete",
- "1396793287667081217"
- ]
- }
- },
- "response": []
- }
- ],
- "protocolProfileBehavior": {}
- },
- {
- "name": "User",
- "item": [
- {
- "name": "1.新增 User",
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\n \"name\": \"dc3\",\n \"password\": \"dc3dc3dc3\",\n \"description\": \"平台开发者账号\"\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "http://localhost:8300/auth/user/add",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "user",
- "add"
- ]
- }
- },
- "response": []
- },
- {
- "name": "2.修改 User",
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\n \"id\": 1,\n \"password\": \"dc3dc3dc3\",\n \"enable\": true,\n \"description\": \"平台开发者账号\"\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "http://localhost:8300/auth/user/update",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "user",
- "update"
- ]
- }
- },
- "response": []
- },
- {
- "name": "3.根据 ID 重置 User 密码",
- "request": {
- "method": "POST",
- "header": [],
- "url": {
- "raw": "http://localhost:8300/auth/user/reset/1397392734298013698",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "user",
- "reset",
- "1397392734298013698"
- ]
- }
- },
- "response": []
- },
- {
- "name": "4.根据 ID 查询 User",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "http://localhost:8300/auth/user/id/1397392734298013698",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "user",
- "id",
- "1397392734298013698"
- ]
- }
- },
- "response": []
- },
- {
- "name": "5.根据 Name 查询 User",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "http://localhost:8300/auth/user/name/dc3",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "user",
- "name",
- "dc3"
- ]
- }
- },
- "response": []
- },
- {
- "name": "6.分页查询 User",
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\n \"name\": \"\",\n \"page\": {\n \"current\": 1,\n \"size\": 500,\n \"orders\": [\n {\n \"column\": \"id\",\n \"asc\": false\n }\n ]\n }\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "http://localhost:8300/auth/user/list",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "user",
- "list"
- ]
- }
- },
- "response": []
- },
- {
- "name": "7.检测 User 是否存在并有效",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "http://localhost:8300/auth/user/check/dc3",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "user",
- "check",
- "dc3"
- ]
- }
- },
- "response": []
- },
- {
- "name": "8.根据 ID 删除 User",
- "request": {
- "method": "POST",
- "header": [],
- "url": {
- "raw": "http://localhost:8300/auth/user/delete/1397392734298013698",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8300",
- "path": [
- "auth",
- "user",
- "delete",
- "1397392734298013698"
- ]
- }
- },
- "response": []
- }
- ],
- "protocolProfileBehavior": {}
- }
- ],
- "protocolProfileBehavior": {}
- }
|