title: “Invalid signature”: oAuth provider with Django-piston revisited using Scribe as a client
body: <p>So while working through an implementation of OAuth using Django-Piston I encountered the error mentioned here: <a href="https://stackoverflow.com/questions/2935446/invalid-signature-oauth-provider-with-django-piston">&quot;Invalid signature&quot;: oAuth provider with Django-piston</a></p>
  
  <p>The solutions posted previously were not working for me so I began digging deeper into both Piston(<a href="https://bitbucket.org/jespern/django-piston/overview" rel="nofollow noreferrer">https://bitbucket.org/jespern/django-piston/overview</a>) and Scribe (<a href="https://github.com/fernandezpablo85/scribe-java" rel="nofollow noreferrer">https://github.com/fernandezpablo85/scribe-java</a>). </p>
  
  <p>It turns out that when signing a Scribe request with a JSON String payload, only the OAuth parameters are actually signed. This causes Piston to fail signature validation as Piston signs all of the parameters in the payload in addition to the OAuth parameters.</p>
  
  <p>I was able to modify Piston to only sign the OAuth parameters and everything is now working fine. Being a bit new to OAuth I was not sure if the is the correct fix, one alternative would be to modify Scribe to sign the payload content as well (or perhaps append each parameter in the payload rather than attaching it as a String).</p>
  
  <p>Does anyone have insight into the proper way to address this issue?</p>