我有一个Linux\Java6客户端,可以使用NTLM验证到SharePoint2010,并使用Apache Commons
我可以使用NTLM进行此操作,但我想使用相同的REST API访问使用Kerberos身份验证的SharePoint 2010。
是否有示例如何使用Kerberos Sharepoint进行身份验证和发送REST over HTTP(最好使用
附言: 我没有访问Sharepoint代码的权限,但我可以访问Sharepoint管理配置。 这是大致上我使用NTLM进行身份验证的方法:
HttpClient
发送HTTP REST Web服务。我可以使用NTLM进行此操作,但我想使用相同的REST API访问使用Kerberos身份验证的SharePoint 2010。
是否有示例如何使用Kerberos Sharepoint进行身份验证和发送REST over HTTP(最好使用
HttpClient
)?附言: 我没有访问Sharepoint代码的权限,但我可以访问Sharepoint管理配置。 这是大致上我使用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"));