Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Where did :verify_oauth_consumer_signature go? #135

Open
alextoul opened this Issue · 0 comments

1 participant

@alextoul

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.