存储/恢复整个应用程序的快照/状态(Store/Restore snapshot/state of entire application)
我想存储整个应用程序状态,然后在下次启动时恢复它。 有没有一个图书馆让我更容易? 或者你们中有人有什么建议吗?
独立应用程序
I want to store the entire application state and then restore it on the next start. Is there a library which would make it easier for me? Or does anyone of you have any suggestions?
Standalone Application
原文:https://stackoverflow.com/questions/38904182
最满意答案
您正在做的最佳解决方案IMO是将OAuth与OpenID结合使用。 你在RP上使用OpenID很好。 但对于需要访问该网站的已安装应用程序,他们应该使用OAuth获得授权。 流程将如下工作:
- 用户在其设备上安装应用程序
- 在安装或首次启动期间,该应用程序有一个“授权我”按钮。
- 用户按下按钮,Web浏览器弹出客户端应用程序访问数据所需的网站。
- 用户使用其OpenID登录该站点
- 网站现在询问“你想要授权客户端应用程序X吗?”
- 用户说是并关闭浏览器。
- 客户端应用程序重新出现并说“谢谢”。 现在具有访问用户数据所必需的OAuth令牌,而无需用户再次登录。
The best solution IMO for what you're doing is to use OAuth combined with OpenID. You're use of OpenID at the RP is fine. But for installed applications that need access to that web site, they should use OAuth to get authorized. The flow would work like this:
- User installs app on their device
- During install or on first launch, the app has an "Authorize me" button.
- The user presses the button and a web browser pops up the web site that the client app needs to access data from.
- User logs into that site using their OpenID
- Site now asks "do you want to authorize client app X?"
- User says yes and closes the browser.
- The client app reappears and says "thanks." and now has the OAuth token necessary to access the user's data without the user ever logging in again.
相关问答
更多-
你应该尝试omniauth宝石,它不仅使用Google OpenID。 Omniauth从提供商那里获取用户数据并传递给您的应用程序,您可以放大 You should try omniauth gem, it uses not only Google OpenID. Omniauth takes user's data from provider and pass to your application which is you can amplify
-
什么是OpenID? OpenID是一个开放, 分散 , 免费的以用户为中心的数字身份框架。 OpenID利用已经存在的互联网技术(URI,HTTP,SSL,Diffie-Hellman),并意识到人们已经在自己创建身份,无论是在他们的博客,照片流,个人资料页面等。通过OpenID,您可以轻松地转换一个这些现有的URI可以用于可以在支持OpenID登录的站点上使用的帐户。 OpenID的 OpenID与常规认证表单的区别? 不同的是,身份认证将被分散到外部网站(例如Wordpress,Yahoo,...)。 ...
-
我看一下实际的omniauth-openid gem的源代码,看起来似乎没有添加这个功能。 尝试发出功能请求。 I take a look through the source-code of the actual omniauth-openid gem and it seems to be, that this functionality is not added. Try to make a feature-request.
-
根据您链接的主题中的注释,看起来该方法可能不再有效。 我提供了另一种在此答案中使用Steam API身份验证的方法,可能对您有所帮助。 Based on the comments in the thread you linked, it looks like that method may no longer work. I provided an alternate way of using the Steam API Authentication in this answer that may be h ...
-
您正在做的最佳解决方案IMO是将OAuth与OpenID结合使用。 你在RP上使用OpenID很好。 但对于需要访问该网站的已安装应用程序,他们应该使用OAuth获得授权。 流程将如下工作: 用户在其设备上安装应用程序 在安装或首次启动期间,该应用程序有一个“授权我”按钮。 用户按下按钮,Web浏览器弹出客户端应用程序访问数据所需的网站。 用户使用其OpenID登录该站点 网站现在询问“你想要授权客户端应用程序X吗?” 用户说是并关闭浏览器。 客户端应用程序重新出现并说“谢谢”。 现在具有访问用户数据所必需 ...
-
事实证明,问题是我发送了一个请求,要求雅虎在身份验证后重定向回到未加密的连接。 如果我告诉雅虎返回https网址,而不是http,一切正常,我只收到一个请求返回给应用程序。 It turns out that the problem was that I was sending a request to tell Yahoo to redirect back to an unencrypted connection after authentication. If I tell Yahoo to retur ...
-
我应该在Rails应用程序中使用哪些OpenId插件/宝石?(What OpenId plugin/gem shall I use for my Rails application?)[2022-05-10]
这个是在openid网站上推荐的 ,所以它很成熟: http://github.com/openid/ruby-openid 它没有任何工作实例,但是这个电视广播为我提供了足够多的信息: http://railscasts.com/episodes/68-openid-authentication This one is featured on openid website, so it's quite mature: http://github.com/openid/ruby-openid It has ... -
我假设您必须使用服务提供商 使用testshib以简单的方式测试您的应用程序。 按照步骤 在您的机器上下载并安装sp 将shibboleth的配置包含在你的apache 2.1中。 进入httpd.conf文件添加包含“PATH / opt / path / etc / apache22”(如果版本是apache2.2,否则相应) 在apache22.config文件中添加您想要保护的位置 - 它将是/ secure bydefault 在你的shibboleth2.xml文件中(在etc文件夹中)把你的实 ...
-
我做了一个需要多种登录可能性的项目(自定义帐户,Google和Facebook) 最后,使用ASP.NET进行身份验证完全取决于您的配置。 (在你的情况下是FormsAuthentication)这意味着FormsAuthentication.SetAuthCookie(model.UserName, model.RememberMe); 基本确定与您的用户有关的所有内容以及您设置的位置不受限制。 您现在基本上与我们开始时的实现相同,使用MembershipProvider来处理您自己的自定义帐户。 您现在 ...
-
所以解决方案就是切换模块。 我改成了文件很简单的Net :: Google :: FederatedLogin ,现在情况正常。 代码如下(替换example.com以下的实际开发人员域名)。 在您的Google Apps Marketplace供应商资料中,将该网址添加到应用程序清单中的index.cgi中: ...
http://www.example.com/index.cgi?from=google&domain=${DOMAIN_NAME} ... 然后将以下代码添 ...