我在.net中有一个web服务,它需要NTLM ()身份验证才能被访问。如何从客户端获得iOS NTLM认证.
发布于 2014-12-24 07:18:35
您可以创建一个NSURLConnection并实现其委托方法。
在此委托中,检查挑战。
[challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodNTLM]如果它来自NTLM,则发送凭据
NSURLCredential *credentail = [NSURLCredential
credentialWithUser:<Your username>
password: <Your password>
persistence:NSURLCredentialPersistenceForSession];
[[challenge sender] useCredential:credentail forAuthenticationChallenge:_challenge];https://stackoverflow.com/questions/21825164
复制相似问题