joken
joken copied to clipboard
Why do claim need to have binary keys?
The claims/0
spec is defined as claims() :: %{required(binary()) => term()
. I'm curious why the claims you pass into Joken functions need to have binary keys. It also works with atom keys but dialyzer fails.
This is probably just because claims are JSON data and that is how JSON libraries usually encode to the format. Nothing really "needed" but thought of as a good practice when dealing with JSON in general.
Do you have a particular use case that atom keys would be a nice fit?