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
Hi,
I am using Swashbuckle.Core 5.2.1 and I am having issues with OAuth2 authentication with requests that have form data parameters.
The only thing different about the requests that don't work is is they have form-data. They are API calls for uploading images, but I don't see why how this would cause them to lose their authorization headers.
I am using an IOperationFilter to add the form-data parameters
It seems that adding the parameter is what is causing the issue:
operation.parameters.Add(new Parameter
{
name = "file",
required = true,
type = "file",
@in = "formData"
}
);
When I don't apply the filter the authorization header is sent, but obviously then there is no form-data.
Anyone else had a similar problem? Or am I adding the form-data parameter incorrectly?
The text was updated successfully, but these errors were encountered:
nastassiar
changed the title
OAuth2 Authorization Header not added to some requests
OAuth2 Authorization Header not to requests with form data parameters
Jun 23, 2015
Oh sorry this is basically a duplicate of swagger-api/swagger-ui#1249 will the fix in swagger-ui be merged into Swashbuckle.Core anytime soon? Or should I just not use the nuget package?
nastassiar
changed the title
OAuth2 Authorization Header not to requests with form data parameters
OAuth2 Authorization Header not added to requests with form data parameters
Jun 23, 2015
Hi,
I am using Swashbuckle.Core 5.2.1 and I am having issues with OAuth2 authentication with requests that have form data parameters.
The only thing different about the requests that don't work is is they have form-data. They are API calls for uploading images, but I don't see why how this would cause them to lose their authorization headers.
I am using an IOperationFilter to add the form-data parameters
It seems that adding the parameter is what is causing the issue:
When I don't apply the filter the authorization header is sent, but obviously then there is no form-data.
Anyone else had a similar problem? Or am I adding the form-data parameter incorrectly?
The text was updated successfully, but these errors were encountered: