# Mocking SwaggerAPI that receives JWT

**URL:** <https://community.auth0.com/t/mocking-swaggerapi-that-receives-jwt/43280>\
**Category:** JWT.io\
**Tags:** jwt, api\
**Created:** [May 19, 2020, 6:32pm UTC](https://community.auth0.com/t/mocking-swaggerapi-that-receives-jwt/43280 "2020-05-19T18:32:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielzen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/danielzen/32/21387_2.png) [@danielzen](https://community.auth0.com/u/danielzen)\
**Post date:** [May 19, 2020, 6:32pm UTC](https://community.auth0.com/t/mocking-swaggerapi-that-receives-jwt/43280/1 "2020-05-19T18:32:40Z")

</div>

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.

Thanks!

---

<div class="post-metadata">

**Author:** ![rsn86](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rsn86/32/22162_2.png) [@rsn86](https://community.auth0.com/u/rsn86)\
**Post date:** [June 24, 2020, 5:22pm UTC](https://community.auth0.com/t/mocking-swaggerapi-that-receives-jwt/43280/2 "2020-06-24T17:22:56Z")

</div>

Take a look at [MockMotor](https://mockmotor.com/pm/).
