jose-jwt
jose-jwt copied to clipboard
JweAlgorithm.DIR should be JweAlgorithm.dir - casing issue
or change JweAlgorithms[JweAlgorithm.DIR] = "dir" to JweAlgorithms[JweAlgorithm.DIR] = "DIR"
Hi @C-Sharp-Coder ,
It correctly set to dir
(lowercase) according to RFC: https://tools.ietf.org/html/rfc7518#section-4.5
What the issue are you facing with constant: JweAlgorithm.DIR
?
@C-Sharp-Coder, If you need this mapping only for decoding, #66 should help :)
@dvsekhvalnov ,
Then should update casing of JweAlgorithm.DIR to JweAlgorithm.dir similar to JwsAlgorithm.none?
I am doing case sensitive comparison of header values.
When I try to convert "dir" to JweAlgorithm.DIR it fails because of case.
Well, probably it is logical, but given it was JweAlgorithm.DIR
for very long time any change here will break existing clients.
Will aliases work you?
Also if you can post some code it can help to better understand what the exact issue you are facing.