Tag: openid

在Rails中从Google / Yahoo检索OpenID AX属性

我在我的应用程序中使用rails插件open_id_authentication 。 这适用于MyOpenID,但是对Google进行身份validation我无法将电子邮件地址作为必需属性的一部分。 据我所知,Google忽略了sreg属性请求,并且只监听AX架构的电子邮件地址。 这是我的代码: def open_id_authentication(openid_url) #google only responds to AX for email, so we must provide that also authenticate_with_open_id(openid_url, :required => [:nickname, :email, ‘http://axschema.org/contact/email’]) do |result, identity_url, registration| if result.successful? @user = User.find_or_initialize_by_identity_url(identity_url) if @user.new_record? unless registration[’email’] || registration[‘http://axschema.org/contact/email’] failed_login “Your OpenID provider didn’t send us an email address.” return end #some providers […]

如何在Ruby中使用OpenID访问Google通讯录

我正在使用devise登录omniauth,authid。 当用户登录时,我得到了 user_info: name: Riccardo Tacconi last_name: Tacconi email: email@gmail.com first_name: Riccardo uid: https://www.google.com/accounts/o8/id?id=xxxxxxxxx provider: google_apps 我找到了一个插件: http : //stakeventures.com/articles/2009/10/06/portable-contacts-in-ruby来获取Google通讯录。 我只需要使用这个方法: @client = PortableContacts::Client.new “http://www-opensocial.googleusercontent.com/api/people”, @access_token 但我需要一个令牌。 我只有uid。 您是否知道如何获取访问令牌? 没有关于访问谷歌的任何文档。

使用omniauth的谷歌open_id连接失败

我正在尝试向我的应用添加open-idfunction,我正在使用omniauth和omniauth-openid gems。 我已经完成了安装步骤,将其作为中间件添加到初始化程序中, require ‘omniauth-openid’ require ‘openid/store/filesystem’ Rails.application.config.middleware.use OmniAuth::Builder do provider :open_id, :store => OpenID::Store::Filesystem.new(‘/tmp’) end 以及用于回调的路由 match ‘/auth/:provider/callback’ => ‘callback#myauthentication’ 当我尝试点击此url时,连接到谷歌提供商 http://[mydomain]/auth/open_id?openid_url=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid 我每次都得到连接失败错误 对于雅虎 http:// [mydomain] /auth/open_id?openid_url=http%3A%2F%2Fme.yahoo.com%2F 如果我尝试使用yahoo open id,即使正确validation后我也会收到invalid_credentials错误更新1:我正在使用apache web服务器和thin / webrick应用服务器。 我validation了如果我不在apache web服务器后面并直接以localhost:3000运行它可以正常工作。 为什么omniauth表现不同

使用authlogic自动创建绕过显式用户注册的用户

我想知道如何使用Authlogic自动注册选择使用开放ID的用户。 现在他们必须首先注册才能登录,即使他们选择开放ID,但我更愿意,如果他们可以直接登录,只要我从开放的id提供商那里获得所有必要的细节。 但我不知道该怎么做呢? 我会在我的用户会话控制器中执行此操作,还是有一些奇特的方法来扩展模型中的authlogic? 如果有人能指出我正确的方向,我将不胜感激。 这是我现在对这两个页面的一个例子: http://morning-warrior-55.heroku.com/ 谢谢,

Ruby on Rails中的OpenID身份validation

我是Ruby on Rails的新手,但我创建了几个小应用程序。 无论如何,我真的对OpenID感兴趣,我想在Rails应用程序中实现OpenID身份validation和一些Sreg内容。 我所做的所有研究都提出了过时或只是不适合我的文章。 因为我对Rails这么新,所以我很难调试这些问题…… 在Rails中实现OpenId的最佳方法是什么?

open_id_authentication – “OpenIdAuthentication.store为零。 使用内存存储。“问题

我正在尝试使open_id_authentication插件正常工作。 最初是用authlogic做的但是放弃了,因为感觉更麻烦的是帮助。 问题是我得到OpenIdAuthentication.store is nil. Using in-memory store. OpenIdAuthentication.store is nil. Using in-memory store. 日志中的警告,阻止正确地validation用户。 这是日志片段: Processing UserSessionsController#create (for 127.0.0.1 at 2010-04-21 23:58:38) [POST] Parameters: {“commit”=>”Sign in”, “authenticity_token”=>”MSPc+VMgsQZ/w7vsb2OiE0azsF1QmphZqfnS6cPRD/U=”, “openid_identifier”=>”http://myopenid.com”} Completed in 12ms (View: 1, DB: 0) | 401 Unauthorized [http://localhost/user_session] Generated checkid_setup request to http://www.myopenid.com/server with assocication {HMAC-SHA1}{4bcf0490}{MN9AXg==} OpenIdAuthentication.store is nil. Using in-memory store. Error […]