diff --git a/65.Spring-Security-OAuth2-Config/security.postman_collection.json b/65.Spring-Security-OAuth2-Config/security.postman_collection.json new file mode 100644 index 0000000..a2de5d6 --- /dev/null +++ b/65.Spring-Security-OAuth2-Config/security.postman_collection.json @@ -0,0 +1,290 @@ +{ + "info": { + "_postman_id": "3e982fc6-c1cb-4459-bca3-5fa81b956a37", + "name": "security", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "/oauth/token 密码模式", + "request": { + "auth": { + "type": "noauth" + }, + "method": "POST", + "header": [ + { + "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", + "key": "Authorization", + "value": "Basic dGVzdDE6dGVzdDExMTE=", + "type": "text" + } + ], + "url": { + "raw": "localhost:8080/oauth/token?grant_type=password&username=mrbird&password=123456&scope=all", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "oauth", + "token" + ], + "query": [ + { + "key": "grant_type", + "value": "password" + }, + { + "key": "username", + "value": "mrbird" + }, + { + "key": "password", + "value": "123456" + }, + { + "key": "scope", + "value": "all" + } + ] + } + }, + "response": [] + }, + { + "name": "/oauth/token 授权码模式", + "request": { + "auth": { + "type": "noauth" + }, + "method": "POST", + "header": [ + { + "key": "Authorization", + "type": "text", + "value": "Basic dGVzdDE6dGVzdDExMTE=", + "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman." + } + ], + "url": { + "raw": "localhost:8080/oauth/token?grant_type=authorization_code&code=1qcUlU&client_id=test&redirect_uri=http://mrbird.cc&scope=all", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "oauth", + "token" + ], + "query": [ + { + "key": "grant_type", + "value": "authorization_code" + }, + { + "key": "code", + "value": "1qcUlU" + }, + { + "key": "client_id", + "value": "test" + }, + { + "key": "redirect_uri", + "value": "http://mrbird.cc" + }, + { + "key": "scope", + "value": "all" + } + ] + } + }, + "response": [] + }, + { + "name": "/oauth/token 刷新令牌", + "request": { + "auth": { + "type": "noauth" + }, + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "dGVzdDE6dGVzdDExMTE=", + "type": "text" + } + ], + "url": { + "raw": "localhost:8080/oauth/token?grant_type=refresh_token&refresh_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJtcmJpcmQiLCJzY29wZSI6W10sImF0aSI6IjQ1NmNlZDZjLTgzMTYtNDgyNy1iY2EwLWU4ZjVlMzkyYTcyZCIsImV4cCI6MTU2MjQwMTUzMywibWVzc2FnZSI6ImhlbGxvIHdvcmxkIiwiYXV0aG9yaXRpZXMiOlsiYWRtaW4iXSwianRpIjoiNGYyOTAxMTItZDllYi00ZjQ5LTk0ZDctZmE3ODRlNmEyYWI1IiwiY2xpZW50X2lkIjoidGVzdDEifQ.5ldS0Fn4znrnW7vAAuy1RVKjvV3H01b42om3-uyNz50", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "oauth", + "token" + ], + "query": [ + { + "key": "grant_type", + "value": "refresh_token" + }, + { + "key": "refresh_token", + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJtcmJpcmQiLCJzY29wZSI6W10sImF0aSI6IjQ1NmNlZDZjLTgzMTYtNDgyNy1iY2EwLWU4ZjVlMzkyYTcyZCIsImV4cCI6MTU2MjQwMTUzMywibWVzc2FnZSI6ImhlbGxvIHdvcmxkIiwiYXV0aG9yaXRpZXMiOlsiYWRtaW4iXSwianRpIjoiNGYyOTAxMTItZDllYi00ZjQ5LTk0ZDctZmE3ODRlNmEyYWI1IiwiY2xpZW50X2lkIjoidGVzdDEifQ.5ldS0Fn4znrnW7vAAuy1RVKjvV3H01b42om3-uyNz50" + }, + { + "key": "client_id", + "value": "test1", + "disabled": true + }, + { + "key": "client_secret", + "value": "test1111", + "disabled": true + } + ] + } + }, + "response": [] + }, + { + "name": "/index", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NjE1NTc2MjEsInVzZXJfbmFtZSI6Im1yYmlyZCIsImF1dGhvcml0aWVzIjpbImFkbWluIl0sImp0aSI6ImRiYzc2NjE4LTEyMzQtNDI4My1iN2E5LWRiNjE0MGJkOWY0NCIsImNsaWVudF9pZCI6InRlc3QxIiwic2NvcGUiOlsiYWxsIl19.jpV34FhG0bkry2BY0JS8Jga7XOZ8UbBWDZ-ROoHc5ps", + "type": "text" + } + ], + "url": { + "raw": "localhost:8080/index", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "index" + ] + } + }, + "response": [] + }, + { + "name": "/login 自定义登录获取令牌(用户名密码)", + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "type": "text", + "value": "Basic dGVzdDE6dGVzdDExMTE=" + }, + { + "key": "Content-Type", + "type": "text", + "value": "", + "disabled": true + } + ], + "url": { + "raw": "localhost:8080/login?username=mrbird&password=123456", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "login" + ], + "query": [ + { + "key": "username", + "value": "mrbird" + }, + { + "key": "password", + "value": "123456" + } + ] + } + }, + "response": [] + }, + { + "name": "/code/sms", + "request": { + "method": "GET", + "header": [ + { + "key": "deviceId", + "value": "xxooxx", + "type": "text" + } + ], + "url": { + "raw": "localhost:8080/code/sms?mobile=17720202020", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "code", + "sms" + ], + "query": [ + { + "key": "mobile", + "value": "17720202020" + } + ] + } + }, + "response": [] + }, + { + "name": "/login/mobile 手机验证码获取令牌", + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Basic dGVzdDp0ZXN0MTIzNA==", + "type": "text" + }, + { + "key": "deviceId", + "value": "xxooxx", + "type": "text" + } + ], + "url": { + "raw": "localhost:8080/login/mobile?mobile=17720202020&smsCode=486498", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "login", + "mobile" + ], + "query": [ + { + "key": "mobile", + "value": "17720202020" + }, + { + "key": "smsCode", + "value": "486498" + } + ] + } + }, + "response": [] + } + ] +} \ No newline at end of file