I am trying to access a WCF service that is using NTLM authentication. More
precise, the WCF binding is defined in C# using:

binding.Security.Transport.ClientCredentialType =
HttpClientCredentialType.Ntlm;

I have read a lot of documentation and I am able now to access the service
using a CXF 3.0.3 client configured to use AsyncHTTPConduit.
But currently it work only with windows credential, that are explictly given
using

(1) org.apache.http.auth.NTCredentials

and not with

*(2) org.apache.http.impl.auth.win.CurrentWindowsCredentials* (Maven GAV is
org.apache.httpcomponents/winauth-jni /4.3.6)

When I use (2), I get a "Authorization loop detected on Conduit" exception. 

The code is the following:



Stacktrace is



Technically it should work using CurrentWindowsCredentials, because I am
able to access the same service and bypassing the NTLM authentication with
client code using the latest Apache HttpComponents directly and a simple
HTTP POST request. When using HttpComponents directly, I use the code



What I have tried already is overwriting the method
setupNIOClient(HTTPClientPolicy clientPolicy) from
org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduitFactory. When I
replace the original build() code within this method:

Original:


by



I get my CXF code working. So currently I think there is to technical
obstacle and either I am using the wrong code sequence or what I assume is
that maybe I am the first who tries to use CurrentWindowsCredentials
together with CXF.



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Authorization-loop-using-CurrentWindowsCredentials-tp5752751.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to