0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

Always assoc :iat claim to tokens for better traceability

This commit is contained in:
Andrey Antukh 2022-07-13 12:55:56 +02:00
parent b4ad907c73
commit ee51e8c719

View file

@ -18,7 +18,10 @@
(defn- generate
[cfg claims]
(let [payload (-> claims d/without-nils t/encode)]
(let [payload (-> claims
(assoc :iat (dt/now))
(d/without-nils)
(t/encode))]
(jwe/encrypt payload (::secret cfg) {:alg :a256kw :enc :a256gcm})))
(defn- verify