菜鸟教程小白 发表于 2022-12-13 10:45:23

iphone - 用新的 iOS 5 Accounts.framework 替换用户名/密码


                                            <p><p>在 <a href="http://developer.apple.com/library/ios/#releasenotes/General/RN-iOSSDK-5_0/_index.html#//apple_ref/doc/uid/TP40010949" rel="noreferrer noopener nofollow">iOS 5 release notes</a>提到了 Accounts.framework:</p>

<blockquote>
<p>Accounts Framework
The Accounts framework (<code>Accounts.framework</code>) provides a single sign-on model for certain user accounts. Single sign-on improves the user experience, because applications no longer need to prompt a user separately for login information related to an account. It also simplifies the development model for you by managing the account authorization process for your application. In iOS 5.0, applications can use this framework in conjunction with the Twitter framework to access a user’s Twitter account.</p>

<p>For more information about the classes of the Accounts framework, see <a href="http://developer.apple.com/library/ios/documentation/Accounts/Reference/AccountsFrameworkRef/_index.html#//apple_ref/doc/uid/TP40011024" rel="noreferrer noopener nofollow">Accounts Framework Reference</a>.</p>
</blockquote>

<p>据我了解,这不等同于 Mac 上的 Keychain,它可以存储用户名和密码,但它使用 <a href="http://oauth.net/" rel="noreferrer noopener nofollow">OAuth</a>这似乎使用 token 进行身份验证,而不是用户名和密码。</p>

<p>现在我不确定的几点:</p>

<ol>
<li><p>如果我想使用 Accounts 框架,我是否必须更改服务器后端的身份验证机制。如果是,我是否需要在服务器端安装某种 OAuth 插件?</p></li>
<li><p>假设是这种情况,并且我可以控制服务器后端,我必须如何处理密码,以便可以将其存储在 Accounts 框架中。</p></li>
<li><p>帐户是否与 iCloud 兼容,所以如果我在 iPad 上登录,我也可以在 iPhone 上自动登录。</p></li>
</ol></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>这里的重点是</p>

<blockquote>
<p>In iOS 5.0, applications can use this framework in conjunction with the Twitter framework to access a user’s Twitter account.</p>
</blockquote>

<p>就目前而言,您不能将 Accounts 框架用于您自己的帐户。它仅用于 Twitter 框架。它是一个独立的框架,因此将来它可以开放给这种用途(<em>或 Apple 提供的任何进一步集成,例如 Facebook 可能</em>)。</p></p>
                                   
                                                <p style="font-size: 20px;">关于iphone - 用新的 iOS 5 Accounts.framework 替换用户名/密码,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/8880999/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/8880999/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: iphone - 用新的 iOS 5 Accounts.framework 替换用户名/密码