Key ID in header, prevent too much retries and make private key optional

  • key id is now looked for in the header instead of the body
  • private key is optional now
  • encoding also puts the key id inside the header

Some formatting may be incorrect, as I added features midway in my own formatting change (I should've done it after I did this pull request!).

There are some leftover code issues as well that I want to solve later. For instance,

get_pl_arg_str("jwt_encode_from_string/4", .., .., ..);

Is always called with jwt_encode_from_string instead of the actual predicate. But I want to tackle those issues later on as this pull request is more focused on functionality than conventions.

Feel free to comment on the changes and change them as you see fit. This version requires a newer version of libjwt than the one in your Dockerfile. It will fail the tests on GitLab but succeed locally. I felt like the Gitlab CI stuff was out of scope for now.

Merge request reports

Loading