密码模式登录
2020-01-31 10:02:15 20 举报
SpringCloud整合Oauth2.0的密码模式登录
作者其他创作
大纲/内容
access_token
oauth2认证服务器
zuul
Tokenaccess_tokentoken_typeexpires_inscope
Service
1.请求认证
redis
auth{client_idsecret}postData{usernamepasswordgrant_typescope}
Token
密码模式登录问题:1.直接输入用户名密码, 项目安全性无法保证(但当前端服务器可以信任时可以采用密码模式)2.session中对服务器压力太大,可考虑放在cookie中,但无法保证客户端安全性
zuul通过资源id自动负载均衡
2.由前台服务器路由/token/oauth/token
3.认证
通过前端服务器访问服务/js调用api服务(跳过前端服务器)
filter1.放过/token认证2.请求拦截,校验token
node.js(渲染页面,负载均衡,路由)1.本地服务器routing2.其他公司服务器(安全性)
0 条评论
下一页