using crit option to require payload #51
Replies: 1 comment
-
| @vrseraphin the  Also the docs are clear on this 
 Its use is limited to acknowledging an extension may be used in a given context, it is not intended for requiring certain claims to be present in the payload - as a matter of fact 
 In other words you’re not using neither the crit header parameter not the option right. | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
JWT.verify fails with errors indicating critical claims are missing even when the claim names are passed within the crit attribute of the options object. These claims are indeed there in the "payload". The library at present seems to be looking for these only within the header portion.
The specific issue is within jwsVerify and the call into the validateCrit
josetest2.zip
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
A clear and concise description of what you expected to happen.
I expect the JWT to be successfully validated with the identified critical claims are within the payload rather than the header.
Environment:
joseversion: [e.g. v1.0.0]Additional context
Add any other context about the problem here.
josetoo.Beta Was this translation helpful? Give feedback.
All reactions