Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is correct OAuth percent encoding?
    primarykey
    data
    text
    <p>I am working on implementing an Oauth Api and am discovering there are a few things I am having trouble validating, would love if anyone could provide clarification. Warning I probably will ramble so I will try to mark my questions in bold.</p> <p>According to the oauth 1.0 spec <a href="http://tools.ietf.org/html/rfc5849">http://tools.ietf.org/html/rfc5849</a>, I am lead to believe that the way oauth params are percent encoded for signatures is different then when on the wire. Section 3.6 <a href="http://tools.ietf.org/html/rfc5849#section-3.6">http://tools.ietf.org/html/rfc5849#section-3.6</a> <em>"It is used only in the construction of the signature base string and the "Authorization" header field."</em></p> <p>RFC3986 <a href="http://tools.ietf.org/html/rfc3986">http://tools.ietf.org/html/rfc3986</a> This appears to be the percent encoding scheme used in normal requests. However I did not see it give any sort of 'this' maps to 'that' so I am assuming if the character is in the reserved list the hexadecimal equivalent should be used.</p> <p><strong>Is the only difference that a ' '(Space) is %20 when encoded for signature?</strong> The Oauth spec makes reference to this, but I can't honestly find where that is defined in the other specs. It would be awesome if someone could point me to where that is mentioned and how I may have misunderstood it.</p> <p><strong>Should other white space characters be %20? Where in the spec does that mention that?</strong></p> <p><strong>Is the conventional UrlEncode fine for form body and query params?</strong></p> <p>Finally I have some example output that I am looking to validate. I tried to show the difference between the Oauth Signature Encoded character and the Url encoded character. Once again the only differences appear to be the handling of the ' ', '*' and '~'</p> <pre><code>Char Oauth Url * %2A * ~ ~ %7E % %25 %25 ! %21 %21 : %3A %3A / %2F %2F = %3D %3D &amp; %26 %26 + %2B %2B %20 + , %2C %2C @ %40 %40 \r\n %0D%0A %0D%0A \n %0A %0A \r %0D %0D " %22 %22 ? %3F %3F ( %28 %28 ) %29 %29 | %7C %7C [ %5B %5B ] %5D %5D </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload