Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Support multiple client-registration-id configurations

Đang mở
#1,343 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java, spring
Lĩnh vực
api, authentication, backend

Hướng nghiên cứu

Xác định phần xử lý hiện có cho spring.cloud.openfeign.oauth2.client-registration-id và điểm vào OAuth2AccessTokenInterceptor. Thêm hỗ trợ cho map client-registration-ids được đề xuất, với khóa là tên Feign client, đồng thời giữ lại property hiện có làm mặc định, và xác minh cả hai đường dẫn cấu hình.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

waiting-for-triage

Multiple registration ids
In some environments it is required to support targeting multiple Oauth2 servers. The current solution for non-load-balanced feign clients only provide a single client-registration-id with the property spring.cloud.openfeign.oauth2.client-registration-id, so this is not possible.

Proposed solution
Add a new configuration: spring.cloud.openfeign.oauth2.client-registration-ids which should be a Map<String, String> mapping feign clients by name to a registration id. The default should still be spring.cloud.openfeign.oauth2.client-registration-id so there are no backward compatibility issues.

Other alternatives considered

  • Using load-balanced clients
    • Downsides
      • A new spring.security.oauth2.client.registration and spring.security.oauth2.client.provider must be provided per each client if the clients use discrete names
      • Using the same name makes it difficult to do ad-hoc switching of hostname for a single client
      • The logs do not show the actual URL called, which makes debugging much more difficult
  • Make a local custom OAuth2AccessTokenInterceptor
Ngôn ngữ chính
Java
Star
1.3k
Fork
836
Merge trung bình
1 ngày 1 giờ
Pull request đã merge (30 ngày)
25

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của spring-cloud/spring-cloud-openfeign

Tất cả issue của spring-cloud/spring-cloud-openfeign

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.