0

Ruby で omniauth および omniauth-openid gem を使用しており、認証中にポップアップ ウィンドウを表示する方法を探しています。

Google の OpenID ドキュメント ( https://developers.google.com/accounts/docs/OpenID ) によると、OpenID User Interface 1.0 にはポップアップ認証を許可する設定があります。

ruby-openid (omniauth-openid の依存関係) をチェックして、OpenID User Interface 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

--- 更新: (2013 年 5 月 8 日) ---

そこで、rack-openid gem をハッキングして 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.claim_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=popupmode=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=popupmode=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=popupreturn_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=popupreturn_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 パラメーターは正しいように見えます。ただし、動作は変更されていません... 何か間違っていますか? 何かご意見は?

4

1 に答える 1

0

実際の omniauth-openid gem のソースコードを調べたところ、この機能は追加されていないようです。機能リクエストを作成してみてください。

于 2013-05-07T15:52:28.380 に答える