Skip to content

Feat: Allow custom HTTP client for JWKS fetching #256

Merged
tanya732 merged 2 commits intomasterfrom
feat/add-configurable-http-client
May 7, 2026
Merged

Feat: Allow custom HTTP client for JWKS fetching #256
tanya732 merged 2 commits intomasterfrom
feat/add-configurable-http-client

Conversation

@tanya732
Copy link
Copy Markdown
Contributor

Changes

File Purpose
JwksHttpClient.java New @FunctionalInterface — the pluggable contract
JwksHttpResponse.java Response value object carrying body + headers
DefaultJwksHttpClient.java Extracted default impl preserving existing URLConnection behavior
JwkProviderBuilder.java New .httpClient(JwksHttpClient) builder method
UrlJwkProvider.java Delegates HTTP to JwksHttpClient; new 2-arg constructor
EXAMPLES.md Usage examples for all four issues

Design decisions

  • Zero breaking changes — existing code works identically; DefaultJwksHttpClient preserves prior behavior
  • Zero new dependencies — users choose their own HTTP library
  • httpClient() takes precedence over proxied(), timeouts(), headers() when set
  • Response is String, not InputStream

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds test coverage
  • This change has been tested on the latest version of Java or why not

Checklist

@tanya732 tanya732 requested a review from a team as a code owner April 30, 2026 04:02
Copy link
Copy Markdown

@hvpareja hvpareja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job @tanya732 ! Thanks!!

Copy link
Copy Markdown

@rmad17 rmad17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tanya732 tanya732 merged commit 1f34a4b into master May 7, 2026
7 checks passed
@tanya732 tanya732 deleted the feat/add-configurable-http-client branch May 7, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants