Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose ValidateOptions in HTTPClientStorageOptions #38

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

kevmo314
Copy link
Contributor

@kevmo314 kevmo314 commented Sep 17, 2024

Adds the ability to configure the JWK validation options when using the HTTP storage.

This API is necessary (I think?) for MicahParks/keyfunc#126 but I guess is also quite useful otherwise.

@MicahParks
Copy link
Owner

Thank you for the PR, @kevmo314.

There are a few other scenarios similar to this in the codebase at the moment, where default options are used without the ability to change them easily. See the below snippet.

jwkset/http.go

Lines 58 to 61 in 0a74b02

options.HTTPURLs[u], err = NewStorageFromHTTP(nil, HTTPClientStorageOptions{})
if err != nil {
return nil, fmt.Errorf("failed to create HTTP client storage for %q: %w", parsed.String(), errors.Join(err, ErrNewClient))
}

If changing any of these now before I get to MicahParks/keyfunc#126 makes anyone else's work easier, please open another PR or issue.

@MicahParks MicahParks merged commit 9a9c935 into MicahParks:main Sep 18, 2024
@MicahParks
Copy link
Owner

@kevmo314, you can use v0.5.20 to include the code from this PR.

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.

2 participants