cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

WebResourceBridge with NTLM Authentication

jw614h
7-Bedrock

WebResourceBridge with NTLM Authentication

Is there any way to authenticate to a web service running on Microsoft server using NTLM?

I see the methods setHttpBasicAuthCredentials  and setWSSUsernameTokenCredentials but no way to set NTLM credentials.

4 REPLIES 4
sharmon
13-Aquamarine
(To:jw614h)

WebResourceBridge does not support NTLM authentication. What are the specifics of the use case and the web service?

jw614h
7-Bedrock
(To:sharmon)

I was trying to upload a file to a client's Sharepoint site using this sample code.

http://www.javaworld.com/article/2078906/enterprise-javaava-tip-consuming-sharepoint-web-se/enterprise-java/java-tip-consuming-sharepoint-web-services-with-a-java-client.html

I was able to create the jar files on the server and download the source files and they look good. The end point gets created but I get an unauthorized error.

I tried to add :

class SharepointAuthenticator extends Authenticator{

      public PasswordAuthentication getPasswordAuthentication () {

            logger.info("inside password");

            return new PasswordAuthentication ("domain\\user","password".toCharArray());

      }

}

Like the article suggested but I get the same error.

This is a nice to have so if it’s a lot of work it’s probably not worth it.

Thanks

cdovholuk
12-Amethyst
(To:jw614h)

If the SharePoint server doesn't support basic auth you'll be out of luck at this time. Sharepoint runs out of IIS and from what I can see by reading online enabling SharePoint for basic auth isn't difficult. It certainly might not be feasible to ask to have this feature enabled if you don't control the SharePoint server but it might be worth asking (if you haven't).

I'll forward this ask on to our Product team so that they are aware of the issue.     

The SharePoint server is a public server so  having basic auth is a big security risk. I'll explore other options. Thanks

Announcements


Top Tags