howtoauth
# pact-js
m
howtoauth
a
I've already read this, it doesn't solve my issue
m
Right sorry, your question is a bit different
I assume it comes in a header. I think as a general rule, we would recommend excluding this from contract testing. It is usually tested by other means, and is tricky to do in a Pact testt.
I don’t think we have any specific matcher that can extract a JWTs contents and then assert on the contents
(albeit that might be something a Plugin could eventually do, could it @uglyog?)
a
Do you think it would be possible for me to create a custom matcher?
Or can I only use pact matchers
Another idea i considered was using some sort of of proxy app to decode the jwt
Also the jwt comes in the body, as it's part of a json response
m
Can you please explain your scenario in a bit more detail then? If it’s in the body, you might be able to do something. But given the keys will be encoded, we don’t any matchers to decode the key and check the decoded contents so it probably won’t be that helpful