小编use*_*506的帖子

在iPhone上声明对SharePoint的身份验证

我为iPhone制作了一个简单的SharePoint客户端应用程序,它需要访问一些SharePoint Web服务(主要是/_vti_bin/Lists.asmx).我在查找如何在较新的SharePoint环境(如Office365)上执行此操作时遇到了麻烦.

对于具有基于表单的身份验证的旧BPOS环境,我能够通过简单的实现didReceiveAuthenticationChallenge方法对这些服务进行身份验证;

-(void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge {
NSURLCredential *newCredential = [NSURLCredential credentialWithUser:username
                                               password:password
                                            persistence:NSURLCredentialPersistenceForSession];
[[challenge sender] useCredential:newCredential
       forAuthenticationChallenge:challenge];
}
Run Code Online (Sandbox Code Playgroud)

这显然不再适用于具有声明身份验证的SharePoint网站,因此我做了一些研究,发现我需要将FedAuthcookie附加到请求中.

http://msdn.microsoft.com/en-us/library/hh147177.aspx

根据这篇文章,使用.NET Apps,似乎可以FedAuth使用WININET.dll 检索那些HTTPOnly cookie,但我想这在iPhone上不可用?

然后,我看到SharePlus应用呈现UIWebView,并让用户首先登录到他们的Office365帐户浏览器屏幕上(这是相同的概念为"启用用户登录远程认证"上述文章的部分解释).

所以,我试图FedAuth通过登录Office365帐户UIWebView,以某种方式访问​​这些cookie ,但是[[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]我没有让我访问HTTPOnly cookie.

有没有办法在iPhone应用程序上实现声明身份验证,而无需指定中间.NET服务来处理身份验证,或者要求用户关闭这些cookie上的HTTPOnly属性?

对不起,我是SharePoint新手,所以我甚至可能没有找到正确的方向,但我很感激任何有关获取iPhone应用程序的声明身份验证的建议.提前致谢!

iphone sharepoint claims-based-identity sharepoint-2010 ios

8
推荐指数
1
解决办法
3579
查看次数