client-oauth2
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -323,9 +323,11 @@ /* global define */ | ||
ClientOAuth2.prototype.createToken = function (access, refresh, type, data) { | ||
data = assign({}, data, { | ||
access_token: access, | ||
refresh_token: refresh, | ||
token_type: type | ||
}) | ||
var options = assign( | ||
{}, | ||
data, | ||
typeof access === 'string' ? { access_token: access } : access, | ||
typeof refresh === 'string' ? { refresh_token: refresh } : refresh, | ||
typeof type === 'string' ? { token_type: type } : type | ||
) | ||
return new ClientOAuth2Token(this, data) | ||
return new ClientOAuth2Token(this, options) | ||
} | ||
@@ -517,6 +519,7 @@ | ||
*/ | ||
OwnerFlow.prototype.getToken = function (username, password) { | ||
OwnerFlow.prototype.getToken = function (username, password, options) { | ||
var self = this | ||
var options = this.client.options | ||
options = assign({}, this.client.options, options) | ||
return this.client._request({ | ||
@@ -523,0 +526,0 @@ url: options.accessTokenUri, |
{ | ||
"name": "client-oauth2", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Straight-forward library for executing OAuth 2.0 flows and making API requests.", | ||
@@ -5,0 +5,0 @@ "main": "client-oauth2.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30912
702