swaggerwcf
swaggerwcf copied to clipboard
No security section in swagger.json
Hi. I use swaggerwcf to make api description of the wcf service with basic authentication. I found that generated json doesn't contains security section. However based on api specification it should (https://swagger.io/docs/specification/2-0/authentication/basic-authentication/).
So to work properly it has to contains both securityDefinitions and security sections:
"securityDefinitions":{ "basicAuth":{ "type":"basic", "description":"Basic authentication" } }, "security":[ { "basicAuth":[
]
}
]
Could you add this section to allow invocation of the wcf service with basic authentication.
there is a workaround, for SecurityDefinitions, follow the Step 4: Configure WCF services general information in readme for security sections, add SwaggerWcfSecurityAttribute to the operations
Ok Thanks. However I used another workaround: I use iis to host wcf service with basic auth. So i just used basic auth module from iis.