Breeze.Sharp - Requires the ability to specify UseDefaultCredentials in the DataService HttpClient structure

Starting with check 0.5.4, the method Breeze.Sharp/DataService.cs::InitializeHttpClientcreates HttpClientwith a standard constructor. My intranet web server has a .Net console application that must be authenticated by the service using Windows authentication. In a world with a preliminary wind, I would create an object HttpClientthat accepts the following in the constructor HttpClientHandler, which then sends the user credentials along with the http request:

HttpClientHandler handler = new HttpClientHandler()
{
    UseDefaultCredentials = true
};  

Thus, the query here should be able to insert my own HttpClientin DataServiceor otherwise specify this parameter when creating EntityManager.

I have currently resolved the issue by modifying my own instance of the Breeze.Sharp library, updating the constructor DataServiceto possibly take HttpClientHandler, for example:

public DataService(String serviceName, HttpClientHandler handler = null) { ... }

I would prefer to continue to use the main library, so I hope this problem will be monitored and resolved for everyone else. :)

+4
source share
2 answers

Updated 6/3/2014

This is now supported in Breeze 0.5.5, now available.

previous message

It makes sense, I will try to study it before the new version .... and thanks for the input.

+2
source

Thanks, Jay, I have included version 5.5 in my project and no longer need a private build. :)

+1
source

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


All Articles