从iOS应用程序发送身份验证令牌Safari浏览器Safari浏览器 [英] Send authentication token to Safari from iOS App to Safari

查看:136
本文介绍了从iOS应用程序发送身份验证令牌Safari浏览器Safari浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序某些URL这需要用户在Safari浏览器通过的OpenURL API。
我的目标是从应用程序发送的验证令牌Safari浏览器,让用户将通过使用此令牌登录。我们的服务器需要这张票发送作为标题信息的一部分。是否有可能以发送自定义页眉与NSURL一起?

I have some URLs in my app which takes the user to Safari browser through openURL API. My aim is to sent the auth token to Safari from the app, so that user will be logged in by using this token. Our server requires this ticket to be sent as part of header information. Is there any possibility to sent custom headers along with NSURL?

我已经检查了以下链接,谈到查询组件,但服务器不处理的话,他们preFER不同的解决方案。 Android是有一些可能性,以发送额外的头在外部浏览器中打开一个URL时,所以现在每一个映入眼帘的是iOS上: - )

I have checked the below link which talks about query components but the server doesn't handle it, they prefer a different solution. Android is having some possibility to sent additional headers when opening a URL in external browser, so now every eye is on iOS :-).

<一个href=\"http://stackoverflow.com/questions/9880922/ios-is-it-possible-to-open-nsurlrequest-directly-in-safari/\">Open的NSURLRequest在Safari

该身份验证令牌保存在一个共享的钥匙扣,有没有办法在Safari浏览器可以访问它?

The auth token is saved in a shared keychain, is there a way in which Safari can access it?

什么是推荐的解决方案?

What is the recommended solution?

我是否需要使用<一个href=\"https://developer.apple.com/library/ios/documentation/Security/Reference/SharedWebCredentialsRef/\"相对=nofollow>共享网络凭据的?相当在这种情况下,我相信需要的一些工作。我没有用它。

Do I need to use Shared Web Credentials? Quite some work required in this case I believe. I have not used it.

推荐答案

最后决定去与web视图作为我们的身份验证票的网址太长,感谢您的帮助。

Finally decided to go with webview as our auth ticket is too long for a url, thanks for the help

这篇关于从iOS应用程序发送身份验证令牌Safari浏览器Safari浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆