request-json
Advanced tools
Comparing version 0.5.4 to 0.5.5
20
main.js
@@ -89,8 +89,16 @@ // Generated by CoffeeScript 1.9.0 | ||
JsonClient.prototype.setBasicAuth = function(username, password) { | ||
var basicCredentials, credentials; | ||
credentials = username + ":" + password; | ||
basicCredentials = new Buffer(credentials).toString('base64'); | ||
return this.headers["authorization"] = "Basic " + basicCredentials; | ||
return this.options.auth = { | ||
user: username, | ||
pass: password | ||
}; | ||
}; | ||
JsonClient.prototype.setDigestAuth = function(username, password) { | ||
return this.options.auth = { | ||
user: username, | ||
pass: password, | ||
sendImmediately: false | ||
}; | ||
}; | ||
JsonClient.prototype.setToken = function(token) { | ||
@@ -101,3 +109,5 @@ return this.headers["x-auth-token"] = token; | ||
JsonClient.prototype.setBearerToken = function(token) { | ||
return this.headers["authorization"] = "Bearer " + token; | ||
return this.options.auth = { | ||
bearer: token | ||
}; | ||
}; | ||
@@ -104,0 +114,0 @@ |
@@ -15,3 +15,3 @@ { | ||
"license": "MIT", | ||
"version": "0.5.4", | ||
"version": "0.5.5", | ||
"homepage": "https://github.com/mycozycloud/request-json/", | ||
@@ -18,0 +18,0 @@ "bugs": { |
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
14262
292