jwt认证那部分不要空白页面一闪到访问页能给个优化思路吗
来源:7-2 SpringSecurity源码解析

迅白旺旺
2017-12-05
jwt认证那部分不要空白页面一闪到访问页能给个优化思路吗,闪空白页体验确实不好
写回答
2回答
-
clients.inMemory() .withClient("imooc1") .secret("imooc1") .authorizedGrantTypes("authorization_code", "refresh_token") .scopes("all") .autoApprove(true) .and() .withClient("imooc2") .secret("imooc2") .authorizedGrantTypes("authorization_code", "refresh_token") .scopes("all") .autoApprove(true);
可以将autoApprove设为true,用户不会被重定向到授权的页面,也不需要手动给请求授权。
00 -
JoJo
2017-12-06
简单的话就把页面美化下,弄成一个正在跳转的页面,显示两三秒,再跳走。复杂的话把授权模式改成用密码模式,登录就授权。不要用授权码模式。
00
Spring Security技术栈开发企业级认证与授权
Spring Security技术栈,REST风格开发常见接口,独立开发认证授权模块保证REST服务安全
2662 学习 · 1561 问题
相似问题