samshers
samshers

Reputation: 3690

When using nimbus-jose-jwt, with RemoteJWKSet can i find(see in logs) when request are made to remote url for cache update etc

I am using nimbus-jose-jwt with RemoteJWKSet and would like to find(see in logs) when requests are made to remote url for cache update etc.
For the spring boot app, I set logging.level.com.nimbusds=TRACE but could not find any logging related to calls to remote url for retrieving the jwks from remote server.
Is there a way to find when a call is made to remote server to retrieve the jwks.

Edit:
Should anyone want to look at the code, the required jwks code is uploaded on github: NimbusJose-JWKSCaching.

Upvotes: 2

Views: 1848

Answers (1)

Sergei
Sergei

Reputation: 623

Looking at the source code of the RemoteJWKSet.java it does not do any logging on its own. It uses DefaultResourceRetriever class to download JWKS resource from remote URL. The DefaultResourceRetriever does not log anything explicitly either. What it does though, it uses standard Java java.net.HttpURLConnection class to request the JWKS resource.

This means that you can use standard Java logging facilities to log information you need. Here are few answers that might be helpful to achieve this:

Upvotes: 2

Related Questions