You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure I followed the latest changes properly but I've been using this plugin for over a year and use :verify_oauth_consumer_signature on all the controllers I wanted to secure.
It worked fine till our latest upgrade and now it seemed that we should be using :oauth_required but we can't get it to work.
Any idea how we can get the same behaviour than :verify_oauth_consumer_signature ?
Update: I got it to work by redefining verify_oauth_consumer_signature in our application controller. Is that safe?
def verify_oauth_consumer_signature
begin
valid = ClientApplication.verify_request(request) do |request_proxy|
@current_client_application = ClientApplication.find_by_key(request_proxy.consumer_key)
# Store this temporarily in client_application object for use in request token generation
@current_client_application.token_callback_url=request_proxy.oauth_callback if request_proxy.oauth_callback
# return the token secret and the consumer secret
[nil, @current_client_application.secret]
end
rescue
valid=false
end
invalid_oauth_response unless valid
end
The text was updated successfully, but these errors were encountered:
I'm not sure I followed the latest changes properly but I've been using this plugin for over a year and use :verify_oauth_consumer_signature on all the controllers I wanted to secure.
It worked fine till our latest upgrade and now it seemed that we should be using :oauth_required but we can't get it to work.
Any idea how we can get the same behaviour than :verify_oauth_consumer_signature ?
Update: I got it to work by redefining verify_oauth_consumer_signature in our application controller. Is that safe?
def verify_oauth_consumer_signature
begin
valid = ClientApplication.verify_request(request) do |request_proxy|
@current_client_application = ClientApplication.find_by_key(request_proxy.consumer_key)
end
The text was updated successfully, but these errors were encountered: