MicahParks / jwkset

A JWK and JWK Set implementation. An auto-caching JWK Set HTTP client is provided. Generate, validate, and inspect JWKs. Self-host this project's website: https://jwkset.com
https://jwkset.com
Apache License 2.0
35 stars 12 forks source link

Expose ValidateOptions in HTTPClientStorageOptions #38

Closed kevmo314 closed 1 month ago

kevmo314 commented 1 month ago

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

This API is necessary (I think?) for https://github.com/MicahParks/keyfunc/issues/126 but I guess is also quite useful otherwise.

MicahParks commented 1 month ago

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. https://github.com/MicahParks/jwkset/blob/0a74b0279c16a96447ea4e3b3391843a88cc8e84/http.go#L58-L61

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

MicahParks commented 1 month ago

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