Log when retrying key resolve.

Signed-off-by: Snorre Magnus Davøen's avatarSnorre Magnus Davøen <snorre.davoen@nsd.no>
parent d70cdf9f
Pipeline #13841 passed with stage
in 30 seconds
......@@ -122,7 +122,8 @@
(let [key-fn (fn [] (get @public-keys (:kid jwt-header)))]
(if-let [key (key-fn)]
key
(do (reset! public-keys (or (fetch-keys jwks-url) @public-keys))
(do (log/info "Retry resolve key " jwt-header " from " jwks-url)
(reset! public-keys (or (fetch-keys jwks-url) @public-keys))
(if-let [key (key-fn)]
key
(throw (ex-info (str "Could not locate public key corresponding to jwt header's kid: " (:kid jwt-header))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment