【发布时间】:2019-03-03 03:30:35
【问题描述】:
Spring Security 5.1.0.M2 (release notes) 添加了对使用 WebClient 时自动刷新令牌的支持。但是,我使用的是RestTemplate。 RestTemplate 是否有类似的机制,还是我需要自己实现该行为?
OAuth2RestTemplate 类看起来很有希望,但它来自单独的 Spring Security OAuth 模块,如果可能的话,我想在客户端使用普通的 Spring Security 5.1。
【问题讨论】:
-
如果可以使用WebClient instead of RestTemplate,或许可以使用described解决方案。
-
@m4gic,暂时不用,因为 REST 客户端将由 swagger codegen 生成。
-
嗯,好像是not easy
标签: java spring spring-boot spring-security spring-security-oauth2