mirror of
https://github.com/penpot/penpot.git
synced 2025-05-21 01:16:11 +02:00
✨ Always assoc :iat claim to tokens for better traceability
This commit is contained in:
parent
b4ad907c73
commit
ee51e8c719
1 changed files with 4 additions and 1 deletions
|
@ -18,7 +18,10 @@
|
||||||
|
|
||||||
(defn- generate
|
(defn- generate
|
||||||
[cfg claims]
|
[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})))
|
(jwe/encrypt payload (::secret cfg) {:alg :a256kw :enc :a256gcm})))
|
||||||
|
|
||||||
(defn- verify
|
(defn- verify
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue