Reputation: 11
I am working with WSO2, and I need to enrich the JWT Token for every request. The enrichment need to be done done by an external rest service.
We are using WSO2 2.2 I am trying to enrich the JWT by extending the class "org.wso2.carbon.apimgt.keymgt.token.JWTGenerator" and by using java HTTPClient librery to work with the rest service. But it seems not natural to use HTTPClient code inside an apim product.
This is the code that I can use, but it seems that wso2 should be able to give me a better way to connect to an api as a client.
Upvotes: 1
Views: 230
Reputation: 12513
If you want to talk to an external REST service to fetch user claims, I don't see a problem with using an HTTP client. I don't understand why it's not natural to use an HTTP client to call an HTTP service. :)
Upvotes: 1