使用Spring security oauth2遇到的问题

在使用spring security oauth2过程中客户端DEBUG中总是有警告信息:

Could not fetch user details: class org.springframework.security.oauth2.common.exceptions.InvalidRequestException, Possible CSRF detected - state parameter was required but no state could be found

检查后发现原来在配置oauth2信息中:

security:
  oauth2:
    client:
      clientId: testclient
      clientSecret: 1234567890
      accessTokenUri: http://localhost:8080/oauth/token
      userAuthorizationUri: http://localhost:8080/oauth/authorize
#      tokenName: oauth_token
#      authenticationScheme: query
      clientAuthenticationScheme: form
    resource:
      userInfoUri: http://localhost:8081/resource/user


clientAuthenticationScheme: form 被注释了导致的,把注释去掉就不在有这个警告信息了,不知道是什么原理,有知道的请告知一下


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值