Open nihalgonsalves opened 6 years ago
iex(1)> JsonWebToken.verify("foobar", %{key: "barbaz"}) ** (RuntimeError) Failed to decode header from JSON (json_web_token) lib/json_web_token/jws.ex:95: JsonWebToken.Jws.header_map/1 (json_web_token) lib/json_web_token/jws.ex:82: JsonWebToken.Jws.validate_alg_matched/2 (json_web_token) lib/json_web_token/jws.ex:77: JsonWebToken.Jws.verify/3 (json_web_token) lib/json_web_token/jwt.ex:89: JsonWebToken.Jwt.verify/2
I would expect that it should return {:error, "invalid"} or something similar, as it isn't the banged verify!/2 version of the function.
{:error, "invalid"}
verify!/2
I would expect that it should return
{:error, "invalid"}
or something similar, as it isn't the bangedverify!/2
version of the function.