omniauth: Server certificate verification

本文介绍了解决使用Google OpenID时遇到的证书验证警告的方法。通过在Rails环境中加载证书文件并安装特定的Ruby库,可以有效避免HTTPS请求过程中出现的安全提示。

WARNING: making https request to https://www.google.com/accounts/o8/.well-known/host-meta?hd=www.google.com without verifying server certificate; no CA path was specified.

 

Solution:

1) in config/environment.rb

# Load certificate bundler
OpenID.fetcher.ca_file = "#{Rails.root}/config/ca-bundle.crt"

2) put ruby-openid-apps-discovery into config
$ cd config
$ wget https://github.com/skrat/ruby-openid-apps-discovery/raw/master/lib/ca-bundle.crt

 

http://toddsedano.blogspot.com/2010/05/integrating-openid-google-apps-and-ruby.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值