Comparing version 0.0.2 to 0.0.3
@@ -21,3 +21,2 @@ var request = require('request'); | ||
'client_secret': this.options.clientSecret, | ||
'type': 'web_server', | ||
'grant_type': 'client_credentials' | ||
@@ -47,2 +46,7 @@ }; | ||
if (err) { return done(err); } | ||
if (r.statusCode.toString().substr(0, 1) !== '2'){ | ||
return done(new Error(body)); | ||
} | ||
try { | ||
@@ -67,5 +71,5 @@ var json = JSON.parse(body); | ||
if (err) return done(err); | ||
if (r.statusCode === 404) return done( null, null); | ||
if (r.statusCode.toString().substr(0, 1) !== '2') return done(new Error(body)); | ||
if(r.statusCode === 404) return done( null, null); | ||
try { | ||
@@ -87,3 +91,3 @@ var json = JSON.parse(body); | ||
request.post({ | ||
url: self.options.apiUrl + '/connections', | ||
url: self.apiUrl + '/connections', | ||
qs: { access_token: accessToken }, | ||
@@ -90,0 +94,0 @@ json: connection |
{ | ||
"name": "auth0", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Client library for the Auth0 platform", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -21,3 +21,3 @@ Node.js client library for the Auth0 platform. | ||
~~~js | ||
strategy.getConnections(function (err, connections){ | ||
client.getConnections(function (err, connections){ | ||
//..... | ||
@@ -68,3 +68,3 @@ }); | ||
strategy.createConnection(myNewConnection, function (err) { | ||
client.createConnection(myNewConnection, function (err) { | ||
//..... | ||
@@ -77,5 +77,5 @@ }); | ||
~~~js | ||
strategy.getConnection(function (err, connection){ | ||
client.getConnection(function (err, connection){ | ||
//..... | ||
}); | ||
~~~ |
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
4491
86