首页 > 编程语言 > 详细

Oauth2的遇坑一点提示(Spring Security Oauth2 / Cloud)

时间:2019-05-03 16:04:21      阅读:344      评论:0      收藏:0      [点我收藏+]

1)使用@EnableOAuth2Sso的网页客户端,登录是成功的可是总是像没成功一样。

    提示错误:没有

    症结:context-path没设置,或者设置为/(ROOT)

  参考资料:https://spring.io/guides/tutorials/spring-boot-oauth2/#_social_login_simple

  技术分享图片

  简单说就是服务器和客户机都在localhost上时,cookie会区分不了。。

 

2)认证服务器,跳转授权都没问题,但是token就是没法取,不是401就是莫名其妙出先一个登录页面。(旧版没发现,在GreenWich/boot 2.1.4上发现的)

  提示错误:WARN- Encoded password does not look like BCrypt

  症结:client_secret需要BCrypt加密。(旧版可以不加密)

  例如:withClient("client1").secret(passwordEncoder.encode("secret1"))

  参考资料:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide

                         https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/html/spring-boot-features.html#boot-features-security-oauth2

       https://docs.spring.io/spring-security-oauth2-boot/docs/current/reference/htmlsingle/

       https://blog.csdn.net/m0_37834471/article/details/81162121?utm_source=blogxgwz5

 

Oauth2的遇坑一点提示(Spring Security Oauth2 / Cloud)

原文:https://www.cnblogs.com/kaixuanpisces/p/10805399.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!