Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Replacement for OAuth2FeignRequestInterceptor from spring-cloud-security?

未关闭
#417 14 条评论 12 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
28/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
java, spring

调研方向

首先阅读 spring-cloud-security 中已弃用的 OAuth2FeignRequestInterceptor,以及所引用的 OAuth 客户端类:DefaultOAuth2ClientContext、DefaultAccessTokenRequest、DefaultRequestEnhancer 和 ClientCredentialsAccessTokenProvider。先查看 OAuth 2.0 Migration Guide 和现有的 issue 讨论。完成的标准是记录或提供一个受支持的替代方案,该方案保留 Feign 的 bearer-token 行为,并支持 Auth0 的 audience 属性。

由索引模型根据 Issue 内容生成。

描述

enhancement

Is your feature request related to a problem? Please describe.
For my Feign Clients I need to add an RequestInterceptor which enhances the requests with an OAuth Bearer Token. I still use the OAuth2FeignRequestInterceptor. But it simply states @deprecated will move to Spring Cloud Openfeign in next major release

I need quite it's features as the oAuth provider Auth0 requires a non standard attribute "audience" - so I configure the interceptor with customized versions of DefaultOAuth2ClientContext, DefaultAccessTokenRequest, DefaultRequestEnhancer, ClientCredentialsAccessTokenProvider (which themselves all get @Deprecated - but the Migration Guide doesn't really help me yet)

Describe the solution you'd like
A 1:1 replacement for the OAuth2FeignRequestInterceptor
or an equivalent which can handle additional attributes in the token request needed for Auth0 ("audience").

Describe alternatives you've considered
I stay with the deprecated OAuth2FeignRequestInterceptor and ignore all the Warnings in the logs and IDE 👎

Additional context
There is also a question on StackOverflow addressing this issue from somebody else - but no answers or ideas yet.

主要语言
Java
星标
1.3k
派生
835
平均合并
23 小时 57 分钟
30 天内合并 PR
25

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

spring-cloud/spring-cloud-openfeign 的其他 Issue

查看 spring-cloud/spring-cloud-openfeign 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。