1 Star 0 Fork 0

InCloudCode / auth-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
auth.postman_collection.json 3.25 KB
一键复制 编辑 原始数据 按行查看 历史
夜雪剑辰 提交于 2018-10-31 17:49 . 添加 postman 测试配置
{
"info": {
"_postman_id": "82224d37-fd39-455e-814b-c23f66e9dc56",
"name": "auth",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "密码模式授权",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8080/oauth/token?username=user_1&password=123456&grant_type=password&scope=select&client_id=client_2&client_secret=123456",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"oauth",
"token"
],
"query": [
{
"key": "username",
"value": "user_1"
},
{
"key": "password",
"value": "123456"
},
{
"key": "grant_type",
"value": "password"
},
{
"key": "scope",
"value": "select"
},
{
"key": "client_id",
"value": "client_2"
},
{
"key": "client_secret",
"value": "123456"
}
]
}
},
"response": []
},
{
"name": "客户端模式授权",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8080/oauth/token?grant_type=client_credentials&scope=select&client_id=client_1&client_secret=123456",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"oauth",
"token"
],
"query": [
{
"key": "grant_type",
"value": "client_credentials"
},
{
"key": "scope",
"value": "select"
},
{
"key": "client_id",
"value": "client_1"
},
{
"key": "client_secret",
"value": "123456"
}
]
}
},
"response": []
},
{
"name": "用授权码获取资源",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8080/order/1?access_token=e437e6b3-5dfd-4516-b0e9-e88c6eb4e0a4",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"order",
"1"
],
"query": [
{
"key": "access_token",
"value": "e437e6b3-5dfd-4516-b0e9-e88c6eb4e0a4"
}
]
}
},
"response": []
},
{
"name": "重新获取授权(密码模式)",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8080/oauth/token?grant_type=refresh_token&refresh_token=cbdf7771-0b8c-4afb-8412-d918b850536b&client_id=client_2&client_secret=123456",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"oauth",
"token"
],
"query": [
{
"key": "grant_type",
"value": "refresh_token"
},
{
"key": "refresh_token",
"value": "cbdf7771-0b8c-4afb-8412-d918b850536b"
},
{
"key": "client_id",
"value": "client_2"
},
{
"key": "client_secret",
"value": "123456"
}
]
}
},
"response": []
}
]
}
1
https://gitee.com/incloudcode/auth-demo.git
git@gitee.com:incloudcode/auth-demo.git
incloudcode
auth-demo
auth-demo
master

搜索帮助