我想通过curl或其他内容(Net::HTTP.get)
发出请求。如何提出请求时如何设置request.env['omniauth.auth']
?什么是request.env
一般?
例如,请查看https://github.com/intridea/omniauth#integrating-omniauth-into-your-application
class SessionsController < ApplicationController
def create
@user = User.find_or_create_from_auth_hash(auth_hash)
self.current_user = @user
redirect_to '/'
end
protected
def auth_hash
request.env['omniauth.auth']
end
end
当我卷曲时,我不知道如何设置request.env ['omniauth.auth']