Forum Discussion

jasfin's avatar
Occasional Visitor
3 years ago

How to hit and get token from another host and then use it in my backend RoR app

I have a backend RoR app running on multiple environments ( prod, dev, test). I am using swagger documentation via the rswag gem. Server url configuration is not added in the swagger.yaml file so that it picks the baseUrl automatically depending on the environment it is hosted because I dont want the user to configure the baseUrl. Now, I need to hit an api hosted on another server , get the jwt token and then use it in my current app. How can I implement this in my current yaml file so that only one api makes a hit to a third party server and all other apis hit the current server where swagger ui is hosted?

No RepliesBe the first to reply