Contributions
Re: Pass Credentials to Embedded Swagger UI's Try it Out
ponelatYou brought up some good points that I looked into further, and it was the latter suspicion you had: though the Swagger UI is embedded in the page, session information is not stored with the client in this web application, so as far as I could tell, the reason I couldn't get the credentials to pass and no header was a present was a result of calls not actually using typical authentication headers. I will still need to tinker with it to figure out how to authenticate the request, but you definitely pointed me in the right direction. Thank you for your help!791Views0likes0CommentsPass Credentials to Embedded Swagger UI's Try it Out
I have a web application that has a Swagger UI 4 embedded in one of the pages (using the swagger-ui-dist dependency free version). When I use Try it Out, I am contacting a server that exists at the same address that the web app is on, but it asks for me to input credentials, despite already being logged into the web app. Is there a way to pass the authorization from the web page to the Try it Out request? I've tried a request interceptor that sets the request.credentials to "include", but that doesn't work. I at one point tried to set up a OAS 3 security schema, but there did not seem to be a way for it to grab the credentials from the page dynamically after the definition was created already.Solved845Views0likes2Comments