Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Conversation

gauthierm
Copy link

Changes query string from a hash to a list. Changes the JSON data structure for passing in parameters.

Where previously data was an object hash, it is now an array:

oauth.request({
    method: 'POST',
    url: endpoint + '/oauth/access_token',
    data: [
        [ 'xauth_username' , username ],
        [ 'xauth_password' , password ],
        [ 'xauth_mode'     , 'client_auth' ]
    ],
    success: handlexAuthSuccess,
    failure: handleFailure
});

@bytespider
Copy link
Owner

Changes looks great, I think I may have to bump the version number to 2.0.0 as these changes are clearly API breaking.

Could you also update the docs https://github.com/bytespider/jsOAuth/blob/gh-pages/api-reference/index.markdown to reflect the changes to the API?

Other than that, great work, I'll let the changing of == to === and a few other formatting things slide.

@gauthierm
Copy link
Author

Thanks. A couple of questions:

  1. Do you want me to open the PR to a 2.0 branch so you can push changes easily?
  2. Do you want the commits squashed before merging?

I can update the docs. The tests are probably also out of date.

@bytespider
Copy link
Owner

Yeah tests would be good.

No, the 2.0 branch was meant for a complete rewrite that I never completed. What I've done is branched off master for 1.x, so I'm happy for these 2.x changes to be on master.

Yea if you could rebase with master, if you didnt already, and squash to a couple or one commit, that would make the merge/history simpler I suspect

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants