Keep old keys around when not finding kid.

Verified using the following:
(update {:my-url {:kid-1 123}} :my-url merge {:kid-1 999})
=> {:my-url {:kid-1 999}}
(update {:my-url {:kid-1 123}} :my-url merge {:kid-2 999})
=> {:my-url {:kid-1 123, :kid-2 999}}
parent b539ff97
Pipeline #28302 passed with stage
in 31 seconds
......@@ -136,7 +136,7 @@
key
(do (log/info "Fetch and resolve key" jwt-header "from" jwks-url)
(when-let [new-keys (fetch-keys jwks-url)]
(swap! keystore #(assoc % jwks-url new-keys)))
(swap! keystore #(update % jwks-url merge new-keys)))
(if-let [key (key-fn)]
key
(do
......
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