- edited description
Add proxy support to the ResourceRetriever
Issue #325
resolved
Problem description
Currently, if the Remote-JWK-Set URL (RemoteJWKSet
) must be accessed using a (http/https) proxy, the proxy configuration is possible by
- using JVM-wide properties such as
https.proxyHost
. - creating a custom ResourceRetriever, for example by extending the DefaultResourceRetriever
The first option is often not possible because this effects also other calls which are not supposed to be changed. The second option works but only by coping code from the DefaultResourceRetriever because the method com.nimbusds.jose.util.DefaultResourceRetriever#retrieveResource is not designed for extension. This produces redundant code.
Enhancement
- Refactor the com.nimbusds.jose.util.DefaultResourceRetriever#retrieveResourcemethod so that it is possible to override parts of it, particularly the part where the URL connection is opened.
- Either create a new concrete ResourceRetriever with proxy support, or add an optional proxy support to the DefaultResourceRetriever.
I would offer to create corresponding pull requests if you agree with the enhancements.
Comments (3)
-
reporter -
The enhancement makes sense! A PR would be very much appreciated :)
-
- changed status to resolved
Done: 7f4dbc0 , v7.8
- Log in to comment