Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No security section in swagger.json #187

Open
alsoloviov opened this issue Dec 14, 2018 · 2 comments
Open

No security section in swagger.json #187

alsoloviov opened this issue Dec 14, 2018 · 2 comments

Comments

@alsoloviov
Copy link

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.

@justin0522
Copy link
Contributor

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

@alsoloviov
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants