OAuth1 icon indicating copy to clipboard operation
OAuth1 copied to clipboard

Check that recursive signature generation meets spec requirements

Open rmccue opened this issue 11 years ago • 1 comments

From #22.

rmccue avatar Jul 16 '14 05:07 rmccue

Assuming the OAuth library you pointed me to the other day is correct, it looks like we're pretty close. For comparision: Our WP_JSON_Authentication_OAuth1::normalize_parameters(), WP_JSON_Authentication_OAuth1::create_signature_string(), WP_JSON_Authentication_OAuth1::join_with_equals_sign() methods compare to their OAuthUtil::build_http_query() and OAuthUtil::urlencode_rfc3986() methods (in php/OAuth.php).

Looks like they may be doing a few small things a bit different, for example:

// If two or more parameters share the same name, they are sorted by their value
// Ref: Spec: 9.1.1 (1)
// June 12th, 2010 - changed to sort because of issue 164 by hidetaka
sort($value, SORT_STRING);

If you'd prefer, I can convert our methods to more closely resemble theirs.

jtsternberg avatar Jul 16 '14 15:07 jtsternberg