You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Jayashankar (JIRA)" <ji...@apache.org> on 2014/05/23 11:17:02 UTC

[jira] [Commented] (CXF-5671) NTLM API not exposed

    [ https://issues.apache.org/jira/browse/CXF-5671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14006994#comment-14006994 ] 

Jayashankar commented on CXF-5671:
----------------------------------

I wasn't to able to configure AsyncClient with NTLM, I ran into another issue with CXF 3.0
There is a need to setAllowChunking to false to make NTLM perform its handshake, but this property is not setting the Content-Length header failing to initiate the 2nd phase of NTLM authentication.

POST /testNTLM.asmx HTTP/1.1
Connection: keep-alive
Host: xx.xxx.xx.xxx:84
Content-Type: application/soap+xml; action="http://xxx/MyWebServices/SayHello"; charset=UTF-8
Accept: */*
User-Agent: Apache CXF 3.0.0

I'm getting 411 for this exception.

> NTLM API not exposed
> --------------------
>
>                 Key: CXF-5671
>                 URL: https://issues.apache.org/jira/browse/CXF-5671
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS Security
>    Affects Versions: 3.0.0-milestone2
>         Environment: Tomcat 6, jdk (1.6 and 1.7)
>            Reporter: Jayashankar
>
> NTLM API using AsyncHTTPConduit is deprecated in cxf 3.0 milestone 2 release, where as it is working in 2.7.7.. It is affecting backward compatibility and there is no proper API to refactor.
> HTTPConduit http = (HTTPConduit)client.getConduit();
> 		if ( http instanceof AsyncHTTPConduit ) {
> 		AsyncHTTPConduit conduit = (AsyncHTTPConduit)http;
> 		DefaultHttpAsyncClient defaultHttpAsyncClient = null;
> 		try {
> 			defaultHttpAsyncClient = conduit.getHttpAsyncClient();
> 		} catch (IOException e) {
> 			// TODO Auto-generated catch block		}
> 		
> 		defaultHttpAsyncClient.getCredentialsProvider().setCredentials( AuthScope.ANY, new NTCredentials( "user", "pwd", "host", "domain" ) );
> 		 
> 		conduit.getClient().setAllowChunking( false );
> 		conduit.getClient().setAutoRedirect( true );
> 		}



--
This message was sent by Atlassian JIRA
(v6.2#6252)