mirror of
https://github.com/penpot/penpot.git
synced 2025-07-15 08:55:13 +02:00
♻️ Refactor invitation flow
Enfoces security and make the flow more deterministic.
This commit is contained in:
parent
6486b24c8b
commit
96facc5100
7 changed files with 117 additions and 156 deletions
|
@ -7,6 +7,7 @@
|
|||
(ns app.tokens
|
||||
"Tokens generation service."
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.exceptions :as ex]
|
||||
[app.common.spec :as us]
|
||||
[app.common.transit :as t]
|
||||
|
@ -17,7 +18,7 @@
|
|||
|
||||
(defn- generate
|
||||
[cfg claims]
|
||||
(let [payload (t/encode claims)]
|
||||
(let [payload (-> claims d/without-nils t/encode)]
|
||||
(jwe/encrypt payload (::secret cfg) {:alg :a256kw :enc :a256gcm})))
|
||||
|
||||
(defn- verify
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue