Omniauth::EveonlineOmniAuthEve Online OAuth2策略。安装时,将以下行添加到应用程序的 Gemfile 中:


gem 'omniauth-eveonline'

然后执行:


$ bundle

或者自行安装:


$ gem install omniauth-eveonline

用法

OmniAuth::Strategies::EveOnline 只是一个机架中间件。阅读 OmniAuth 文档以获取详细说明。以下是将中间件添加到 Rails 应用程序的示例,需将代码添加到 config/initializers/omniauth.rb


Rails.application.config.middleware.use OmniAuth::Builder do

  provider :eveonline, ENV['EVE_ONLINE_CLIENT_ID'], ENV['EVE_ONLINE_SECRET'], scope: 'publicData,esi-ui.metadata.read'

end