swaggerwcf icon indicating copy to clipboard operation
swaggerwcf copied to clipboard

No security section in swagger.json

Open alsoloviov opened this issue 6 years ago • 2 comments

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.

alsoloviov avatar Dec 14 '18 12:12 alsoloviov

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

justin0522 avatar Dec 20 '18 09:12 justin0522

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.

alsoloviov avatar Dec 20 '18 11:12 alsoloviov