Reputation: 2814
I have a WCF REST service that uses windows authentication here is the configuration:
<webHttpBinding>
<binding name="web_authenticate_binding" maxReceivedMessageSize="2147483647">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
<readerQuotas maxDepth="128" maxStringContentLength="2147483647" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binding>
</webHttpBinding>
I am trying to use SWAGGER-UI (and SWAGGER Editor) to invoke this REST service but when I invoke the service I get 401 Unauthorized as expected, because I am not sending my windows credentials.
How can I send my windows credentials to the SWAGGER-UI or give it as parameter so everyone can pass its own credentials?
Upvotes: 4
Views: 808
Reputation: 1075
If you want that someone passes his own credentials, you will need to change the clientCredentialType
. This reference may help: https://msdn.microsoft.com/en-us/library/ms733836(v=vs.110).aspx.
The Basic
authentication type is probably the simplest one, but it depends if it is suitable for you.
Upvotes: 1