-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra modification for Previous ECMA Version #323
Open
cr24osome
wants to merge
104
commits into
ciaranj:master
Choose a base branch
from
unknown repository
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
see this StackOverflow answer for more info: http://programmers.stackexchange.com/a/178252/7433
Added bluebird as a dependency Using Bluebird's promisifyAll and an object that delegates methods to the OAuth2 implementation to be able to support promises. Copied tests from oauth2 to oauth2promises. Existing tests are passing with some small corrections.
Version is now 0.9.15, added links to both GPL and MIT licenses.
and some code style cleanup #8
"Setting multiArgs to true means the resulting promise will always fulfill with an array of the callback's success value(s). This is needed because promises only support a single success value while some callback API's have multiple success value. The default is to ignore all but the first success value of a callback function." explanation is here: http://bluebirdjs.com/docs/api/promise.promisifyall.html#option-multiargs fixes #10
related to #4
Needed to use the _oa raw client instead of the oa client which is the promisfied wrapper. The test is "and followRedirect is false it should not perform the secure request with the new location". related to #4
instead of being a required dependency, related to #4
The function returns a string value immediately and is not asynchronous, this fixes three broken unit tests in oauthpromise-tests.js. related to #4
When using the promise, it would pass the response and an IncomingMessage object. We only need to pass the data object from the response.
* OAuth Promises * OAuth2 Promises * Examples that use promises * Existing tests for OAuth and OAuth2 ported to ensure backwards compatibility with Promise wrapper objects
move extraParams to getOAuthAccessToken parameters
We have to use both constructor because old constructor is deprecated but we still need it. And new node js versions don’t allow using old constructor.
This reverts commit 9152ac5.
…uctor Backwards compatible buffer constructor to support older versions of Node (for Amazon Lambda)
* Adds EventEmitter api to request for OAuth2 client This add to events first one if for before _request method executes and second one is after _request method executes. This commit also include test cases. * Adds OAuth2 example with hooks * Updates Readme * Replace ES6 style for backward compatibility * version bump to 0.9.16 * style changes to appease Codacy
* Allow passing Content-Type header to OAuth constructor to set _defaultContentType * Added _defaultContentType instance variable to OAuth * Added setDefaultContentType method to set Content-Type header to something other than application/x-www-form-urlencoded when creating a request with post/get/etc * README.md: Add setting content type to 'application/json' to the example for OAuth1 and change requires to reference 'oauth-libre' instead of 'oauth'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.