artemeff / jwt

Erlang JWT library
http://jwt.io/
MIT License
38 stars 39 forks source link

Removed optional alg parameter. #13

Closed stevenlivz closed 6 years ago

stevenlivz commented 6 years ago

Hi Yuri. According to rfc7517 the alg parameter is optional and it being mandatory in the code - particularly for decoding - was causing me issues. This PR simply removed the dependency and works with my keys (in my code from Azure AD - an example here ).

` 4.4. "alg" (Algorithm) Parameter

The "alg" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA "JSON Web Signature and Encryption Algorithms" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The "alg" value is a case-sensitive ASCII string. Use of this member is OPTIONAL. `