Mocking SwaggerAPI that receives JWT


I am helping with an app that requires all requests be made via a JWT that is signed by the client. Given a Swagger definition I would like to mock out a server that can accept and respond to these tokens. Swagger’s virtual server doesn’t support this, and I am wondering what others do to mock out JWT servers? The server needs to decode and parse the JWT using the public key. I have considered writing a proxy to do this but am hoping that someone may have a better suggestion.


Take a look at MockMotor.