在 Spring Cloud Alibaba在验证密码之前能通过上下文拿到用户名吗?

在 Spring Cloud Alibaba中spring security在验证密码之前能通过上下文拿到用户名吗?c66bc8ab0f5527b8a00f55f594afc246.png

展开
收起
小小鹿鹿鹿 2023-11-07 22:16:11 81 分享 版权
1 条回答
写回答
取消 提交回答
  • 两个办法,userpasswordfilter前加一个filter,把username作为变量塞到context里。或者拼装password把用户名追加上,到encoder里再拆出来。此回答来自钉群群5 Spring Cloud Alibaba。

    2023-11-07 22:59:20
    赞同 展开评论

为企业提供高效、稳定、易扩展的中间件产品。

热门讨论

热门文章

还有其他疑问?
咨询AI助理