Comparing version 0.3.0 to 0.3.1
@@ -8,5 +8,5 @@ 'use strict'; | ||
var _logger = require('./logger'); | ||
var _simpleOauth = require('simple-oauth2'); | ||
var _logger2 = _interopRequireDefault(_logger); | ||
var _simpleOauth2 = _interopRequireDefault(_simpleOauth); | ||
@@ -17,6 +17,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var oauth2 = require('simple-oauth2'); | ||
function authentication(clientId, secret) { | ||
var logger = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _logger2.default; | ||
function authentication(clientId, secret, logger) { | ||
var credentials = { | ||
@@ -33,3 +30,3 @@ client: { | ||
}; | ||
var instance = oauth2.create(credentials); | ||
var instance = _simpleOauth2.default.create(credentials); | ||
return { | ||
@@ -78,2 +75,4 @@ credentials: credentials, | ||
getToken: function getToken(code, redirectUri) { | ||
var _this2 = this; | ||
var params = { | ||
@@ -90,3 +89,3 @@ code: code, | ||
return this.instance.authorizationCode.getToken(params).then(function (result) { | ||
return oauth2.accessToken.create(result); | ||
return _this2.instance.accessToken.create(result); | ||
}); | ||
@@ -93,0 +92,0 @@ } |
{ | ||
"name": "myob", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "repository": "git@github.com:ordermentum/myob-javascript-sdk.git", |
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
33595
516