You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any way to get around conflicting header names? I am using 2-legged OAuth2 in my API, so I have documented the token route which uses an "Authorization" header with "Basic [key]" and the route returns a token. However every other route uses a header that is "Authorization: Bearer [token]" which is implemented using the method below:
It seems that when that Authorization header is set globally, there is no way for a header with the same name to be overwritten on a route-by-route basis. My only solution right now is disabling the "Try It Now" button for the token route. Is there a way for both of them to exist together while still be able to prepopulate a token?
The text was updated successfully, but these errors were encountered:
After consulting with some members on the #swagger irc, the solution was to set up securityDefinitions in my swagger.json, set "oauth2" as the global security and set "basic" as the security for the token route. Everything works as expected now.
Is there any way to get around conflicting header names? I am using 2-legged OAuth2 in my API, so I have documented the token route which uses an "Authorization" header with "Basic [key]" and the route returns a token. However every other route uses a header that is "Authorization: Bearer [token]" which is implemented using the method below:
It seems that when that Authorization header is set globally, there is no way for a header with the same name to be overwritten on a route-by-route basis. My only solution right now is disabling the "Try It Now" button for the token route. Is there a way for both of them to exist together while still be able to prepopulate a token?
The text was updated successfully, but these errors were encountered: