Closed Lukahm closed 7 years ago
I'm running into this as well.
Here is a link to your OAuth gem ticket for reference: https://github.com/oauth-xx/oauth-ruby/issues/131
Did you recently update the ims-lti gem? There was a breaking change in the 2.1.0.beta.x version of the gem.
I commented in the OAuth gem, I think I found the problem. Rails 5's request object is no longer a Rack::Request
.
A comment in the other one points out there is already a proxy that works, just use require 'oauth/request_proxy/action_controller_request'
instead of require 'oauth/request_proxy/rack_request'
I haven't tested it, but makes sense to me it'd work. Maybe just a readme update is in order.
Note that in my tests I also needed to update the oauth
gem to 0.5.x
by relaxing the dependency constraint (see #90).
closing this since the fix is to use a newer version of the oauth gem. The dependency on the oauth gem has been relaxed to allow this.
Updating the oauth
to at least 0.5.1
and adding require 'oauth/request_proxy/action_controller_request'
at the start of the file helped me to extend the list of available proxies to:
{
Net::HTTPGenericRequest=>OAuth::RequestProxy::Net::HTTP::HTTPRequest,
Hash=>OAuth::RequestProxy::MockRequest, Rack::Request=>OAuth::RequestProxy::RackRequest,
ActionDispatch::Request=>OAuth::RequestProxy::ActionControllerRequest
}
I did update for rails app form 4 to 5 recently.
Then IMS::LTI::ToolProvider is not working properly.
Here is the code:
I got an error when
provider.valid_request?(request)
is excuted.Here is the error: OAuth::RequestProxy::UnknownRequestType (ActionDispatch::Request):