上一篇是站在巨人的肩膀上去研究OAuth2.0,也是爲了快速幫助你們認識OAuth2.0,閒話少說,我根據框架中OAuth2.0的使用總結,畫了一個簡單的流程圖(根據用戶名+密碼實現OAuth2.0的登陸認證):html
上面的圖很清楚的描述了當前登陸login的流程,如今咱們針對於login作成相關的微服務,解析以下:web
"userName":"admin", ---也能夠是手機號碼等spring
"password": "e10adc3949ba59abbe56e057f20f883e" json
返回的結果集: {架構
"code": "200",app
"message": "Success",框架
"version": "v1.0",微服務
"data": {工具
"userInfo": {測試
"userId": "00001",
"pwd": "e10adc3949ba59abbe56e057f20f883e",
"userName": "admin",
"mobile": "15875500000",
"telephone": "",
"wechat": "",
"email": "xxx@qq.com",
"status": "1",
"createTime": "2017-06-26"
},
"roleIds": "100",
"tokenInfo": {
"accessToken":"4de55a69-e372-4766-acd3-1c419d6f2fda",
"tokenType": "bearer",
"webTokent":"uHSLjfJoQwU4t4PAqCzH1SN0fp7PUWKluPNS+x1dZ8R9Gx+NJkBI7w==",
"refreshToken":"d3d71594-5c3f-4a68-a7e5-b8d21c4fa73b",
"expiresIn": 34644,
"scope": "read write"
}
}
}