Call Windows Authentication WCF from SWAGGER-UI

I have a WCF REST service that uses windows authentication here, this 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 try to use SWAGGER-UI (and the SWAGGER editor) to call this REST service, but when I call the service, I get 401 Unauthorized as expected because I am not sending my Windows credentials.

How can I send my Windows credentials to SWAGGER-UI or specify it as a parameter so that everyone can transfer their own credentials?

+4
source share
1 answer

, - , clientCredentialType. : https://msdn.microsoft.com/en-us/library/ms733836(v=vs.110).aspx.

Basic, , , , .

+1

Source: https://habr.com/ru/post/1583994/


All Articles