journeyapps
Advanced tools
Comparing version 0.2.18 to 0.2.19
@@ -50,4 +50,9 @@ var base64 = require('../util/base64'); | ||
} | ||
this.username = options.username; | ||
this.password = options.password; | ||
if (options.token) { | ||
this.authorization = 'Token ' + options.token; | ||
} else { | ||
this.authorization = 'Basic ' + base64.encode(options.username + ':' + options.password); | ||
} | ||
} | ||
@@ -60,9 +65,5 @@ | ||
ApiCredentials.prototype.basicAuth = function() { | ||
return "Basic " + base64.encode(this.username + ':' + this.password); | ||
}; | ||
ApiCredentials.prototype.apiAuthHeaders = function() { | ||
return { | ||
'Authorization': this.basicAuth() | ||
'Authorization': this.authorization | ||
}; | ||
@@ -69,0 +70,0 @@ }; |
@@ -695,3 +695,3 @@ // # schema module | ||
if (Object.keys(type.options).length != 2) { | ||
pushError(element, 'A boolean contain exactly two options.'); | ||
pushError(element, 'A boolean must contain exactly two options.'); | ||
} | ||
@@ -698,0 +698,0 @@ } |
{ | ||
"name": "journeyapps", | ||
"version": "0.2.18", | ||
"version": "0.2.19", | ||
"description": "Journey JS library", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
616476
81
14518