iOS:使用SharePoint Server之前的NTLM身份验证

时间:2012-10-26 10:18:15

标签: ios sharepoint soap ntlm

在向Web服务发送SOAP请求之前,如何通过NTLM(基于Windows)在SharePoint上进行身份验证?
我应该通过ASIHTTPRequest还是CFNetwork获得令牌? 示例代码会很棒!

1 个答案:

答案 0 :(得分:1)

在连接受到质疑或身份验证时,我联系了连接网址的连接挑战部分......

-(void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
{
    NSURLCredential *credential = [NSURLCredential credentialWithUser:self.userName
                                                         password:self.userPassword
                                                         persistence:NSURLCredentialPersistenceForSession] ;
    [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge];
    NSLog(@"Getting Authentication Challenges");

}

不知道我在哪里找到它(并且不管它是谁!)但这对我有用。但说实话,我并没有使用肥皂请求而且我没有起诉任何连接库....

希望这是一些帮助。