aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/jwt.ex
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@gmail.com>2019-04-20 19:42:19 +0700
committerRoman Chvanikov <chvanikoff@gmail.com>2019-04-20 19:42:19 +0700
commit64a2c6a041ca62ad84b1d682ef56fbca45e44de5 (patch)
tree235560f05e44f3b330613c3dae57a77924d865a2 /lib/pleroma/jwt.ex
parent73407f4eea7793c93981a87bb7eddef4f8daab7c (diff)
downloadpleroma-64a2c6a041ca62ad84b1d682ef56fbca45e44de5.tar.gz
Digest emails
Diffstat (limited to 'lib/pleroma/jwt.ex')
-rw-r--r--lib/pleroma/jwt.ex9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/pleroma/jwt.ex b/lib/pleroma/jwt.ex
new file mode 100644
index 000000000..10102ff5d
--- /dev/null
+++ b/lib/pleroma/jwt.ex
@@ -0,0 +1,9 @@
+defmodule Pleroma.JWT do
+ use Joken.Config
+
+ @impl true
+ def token_config do
+ default_claims(skip: [:aud])
+ |> add_claim("aud", &Pleroma.Web.Endpoint.url/0, &(&1 == Pleroma.Web.Endpoint.url()))
+ end
+end