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
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.
WebResourceBridge does not support NTLM authentication. What are the specifics of the use case and the web service?
I was trying to upload a file to a client's Sharepoint site using this sample code.
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
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