我有一个 Linuxjava6 客户端, 该客户端将认证2010年与NTLM共享点, 然后使用 Apache Commons < code> HttpClient 发送 HTTP REST 网络服务 。
我可以用NTLM(NTLM)做到这一点, 但我想用同样的REST API访问2010年共享点,
Any examples how to authenticate and send REST over HTTP with a kerberos sharepoint?
(preferably using HttpClient
)
p.s. I dont have access to sharepoint code, but i do have access to sharepoint admin configurations. This is roughly how I authenticate with NTLM:
HttpClient httpClient = new HttpClient(new SimpleHttpConnectionManager(true));
AuthPolicy.registerAuthScheme(AuthPolicy.NTLM, JCIFS_NTLMScheme.class);
String localHostName = Inet4Address.getLocalHost().getHostName();
authscope = new AuthScope(uri.getHost(), AuthScope.ANY_PORT);
httpClient.getState().setCredentials(authscope,new NTCredentials(
getUsername(),getPassword(),localHostName,getDomain()));
// after the initial ntlm auth I can call my REST service with "httpClient.executeMethod"
int status = httpClient.executeMethod(new GetMethod(accessURI + "/sitecollection/info"));