jaydoane commented on a change in pull request #2668: Throw if an unknown check
is passed to jwtf:decode
URL: https://github.com/apache/couchdb/pull/2668#discussion_r393179782
##########
File path: src/jwtf/src/jwtf.erl
##########
@@ -112,6 +113,15 @@ validate(Header0, Payload0, Signature, Checks, KS) ->
Key = key(Header1, Checks, KS),
verify(Alg, Header0, Payload0, Signature, Key).
+validate_checks(Checks) when is_list(Checks) ->
+ ValidChecks = [alg, exp, iat, iss, kid, nbf, sig, typ],
Review comment:
I would prefer to see these defined at the top of the file along with `ALGS`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services