bryanjos/joken — pull request #10 by cconstantin (2014-10-28 04:54:08+00:00)
Title: Ensure header/and claim keys are serialized in original order when checking signature

I had trouble decoding a token created with Ruby and traced the issue to the use of maps in elixir, in particular the fact that maps don't have ordered keys.

Ruby hashes are ordered based on insertion time, which means deserializing and serializing a hash always yields the keys in the same order.

In Elixir/Jazz, deserializing `{b: "b", a: "a"}` and serializing the result produces `{a: "a", b: "b"}`, and as a result yields a different signature.

Couldn't figure out how to make Jazz deserialize to keyword lists, so I gave JSX a try.