Packages

Library for adding Artsy's omniauth based authentication to your app.

Current section

Files

Jump to
artsy_auth_ex lib artsy Auth token.ex
Raw

lib/artsy/Auth/token.ex

defmodule Artsy.Auth.Token do
@moduledoc """
Joken based module for encode/decoding Artsy's JWT token.
"""
use Joken.Config
def token_config do
aud = Application.get_env(:artsy_auth_ex, :token_aud)
%{}
|> Joken.Config.add_claim("aud", fn -> aud end, &(&1 == aud))
end
end