我对omniauth/openid 有点麻烦。
尝试进行身份验证时,我在日志中发现了这一点:
OpenID::FetchingError: Error fetching https://www.google.com/accounts/o8/.well-known/host-meta?hd=profiles.google.com%2Fmy_username: undefined method `io' for nil:NilClass
重要的是undefined method io' for nil:NilClass
来自 openid/fetchers.rb,在以下代码段中:
module Net
class HTTP
def post_connection_check(hostname)
check_common_name = true
cert = @socket.io.peer_cert
cert.extensions.each { |ext|
next if ext.oid != "subjectAltName"
ext.value.split(/,\s+/).each{ |general_name|
if /\ADNS:(.*)/ =~ general_name
check_common_name = false
...
该错误是由生成的@socket.io.peer_cert
,@socket 未定义。
你们有没有人遇到过这种情况?不太清楚是什么原因。
我正在运行的版本:
- 红宝石 1.9.3dev (2010-08-17 主干 29020) [x86_64-darwin10.4.0]
- 红宝石-openid (2.1.8)
- ruby-openid-apps-discovery (1.2.0)
- 全域认证 0.2.0