Hi - I have just discovered the JWT extension and ...
# help
t
Hi - I have just discovered the JWT extension and I am keen to replace some hand crafted JWT generation with it The docs state to register the JwtExtensionFactory with WireMock and provide an example of how to do this
Copy code
new WireMockServer(wireMockConfig().extensions(JwtExtensionFactory.class));
However this does not compile with the message
no suitable method found for extensions(java.lang.Class<org.wiremock.extension.jwt.JwtExtensionFactory>)
I am using
wiremock:3.5.2
imported via
spring-cloud-contract-wiremock:4.1.4
and
wiremock-jwt-extension:0.1.0
Any pointers greatly appreciated.
t
Recommend you override the WireMock version and bump up to 3.9.1 as 3.5.2 is before we added extension factories.
t
Thank you That has moved me on a little, but it seems the Spring Boot Test integration is broken by the uplift unfortunately.
t
Switching to the standalone JAR (and standalone JWT JAR) might fix this
t
Thanks for the assistance I am now using this is an updated container for our integrated tests. It is a fantastic addition. My goal in try to get it going in the unit tests was primarily to give it a quick try so I'll probably wait until the spring cloud dependences are updated