Swashbuckle.WebApi
Swashbuckle.WebApi copied to clipboard
Authorization Header stripped using latest version
** As per the contributing guidelines, please restrict the creation of issues to reproducible bug reports and feature requests that align to the project's goals. If you have general questions or feedback around the use of Swashbuckle, PLEASE DON'T CREATE AN ISSUE AND POST TO STACKOVERFLOW INSTEAD.
Also note that Swashbuckle leverages the swagger-ui project but doesn't actually implement any UI code. If you've discovered a UI-specific issue, PLEASE DON'T CREATE AN ISSUE HERE AND POST TO THE SWAGGER-UI REPO INSTEAD **
VERSION:
Swashbuckle 5.6 and .Net Core 3.1.
STEPS TO REPRODUCE:
Navigate to the service landing page to display the OpenAPI content. This should sit behind an authorization service, so the browser will display a popup requesting basic credentials prior to viewing the page.
On using any of the service requests, the authorization header should implicitly be sent as a request header, without requiring any explicit page entry using Swagger UI functionality.
EXPECTED RESULT:
An authorization error will not be returned. The request result will satisfactorily return and include the authorisation header with basic encrypted string as a request header.
ACTUAL RESULT:
An authorization error is returned and no authorization header is sent with the request. However, if using 'SerializeAsV2', the header is added without the encrypted basic string.
ADDITIONAL DETAILS
This functionality used to work using .Net Core 2.2 and other version of Swashbuckle. Is this being stripped by OpenAPI?