2013-05-07 179 views
0

在Ruby中使用omniauth和omniauth-openid宝石,并且正在寻找一种在认证过程中弹出窗口的方法。Ruby中的Omniauth + OpenID:弹出的Google OpenID身份验证

根据Google的OpenID文档(https://developers.google.com/accounts/docs/OpenID),OpenID用户界面1.0有一个允许弹出式认证的设置。

我检查了ruby-openid(它是omniauth-openid的依赖项),以确认它已升级以支持OpenID用户界面1.0。

现在,我只是想弄清楚的最后一块拼图。我认为这将是我的配置设置,目前像这样的地方:

require 'omniauth-openid' 
require 'openid/store/filesystem' 

Rails.application.config.middleware.use OmniAuth::Builder do 
    provider :open_id, :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id' 
end 

--- UPDATE (2013年5月8日)---

所以我砍死机架OpenID的宝石包括OpenID的UI扩展,现在我的URL看起来如下:

https://www.google.com/accounts/o8/ud?openid.ax.if_available=ext4%2Cext5%2Cext6%2Cext7%2Cext8&openid.ax.mode=fetch_request&openid.ax.required=ext0%2Cext1%2Cext2%2Cext3&openid.ax.type.ext0=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ax.type.ext1=http%3A%2F%2Faxschema.org%2FnamePerson&openid.ax.type.ext2=http%3A%2F%2Faxschema.org%2FnamePerson%2Ffirst&openid.ax.type.ext3=http%3A%2F%2Faxschema.org%2FnamePerson%2Flast&openid.ax.type.ext4=http%3A%2F%2Faxschema.org%2FnamePerson%2Ffriendly&openid.ax.type.ext5=http%3A%2F%2Faxschema.org%2Fcontact%2Fcity%2Fhome&openid.ax.type.ext6=http%3A%2F%2Faxschema.org%2Fcontact%2Fstate%2Fhome&openid.ax.type.ext7=http%3A%2F%2Faxschema.org%2Fcontact%2Fweb%2Fdefault&openid.ax.type.ext8=http%3A%2F%2Faxschema.org%2Fmedia%2Fimage%2Faspect11&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.ax=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ns.sreg=http%3A%2F%2Fopenid.net%2Fextensions%2Fsreg%2F1.1&openid.ns.ui=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fui%2F1.0&openid.realm=http%3A%2F%2Flocalhost%3A1999&openid.return_to=http%3A%2F%2Flocalhost%3A1999%2Fauth%2Fgoogle%2Fcallback%3F_method%3Dpost&openid.sreg.optional=postcode%2Cnickname&openid.sreg.required=email%2Cfullname&openid.ui.mode=popup

所有参数看起来都是正确的,特别是openid.ns.ui参数和openid.ui.mode参数;然而,行为并没有改变...我做错了什么?有什么想法吗?

回答

0

我来看看实际的omniauth-openid gem的源代码,它似乎是,这个功能没有被添加。尝试提出功能请求。