postman-collection
Advanced tools
Comparing version 3.4.5 to 3.4.6-beta.1
@@ -5,2 +5,3 @@ var _ = require('../util').lodash, | ||
Url = require('./url').Url, | ||
RequestAuth = require('./request-auth').RequestAuth, | ||
UrlMatchPattern = require('../url-pattern/url-match-pattern').UrlMatchPattern, | ||
@@ -14,4 +15,6 @@ ProxyConfig, | ||
MATCH_ALL_HOST_AND_PATH = '*/*', | ||
AUTH_CREDENTIALS_SEPARATOR = '@', | ||
DEFAULT_PROTOCOL = 'http', | ||
ALLOWED_PROTOCOLS = ['http', 'https'], | ||
BASIC_AUTH_METHOD = 'basic', | ||
// 'http+https://*/*' | ||
@@ -87,2 +90,8 @@ DEFAULT_PATTERN = ALLOWED_PROTOCOLS.join(PROTOCOL_DELIMITER) + PROTOCOL_HOST_SEPARATOR + MATCH_ALL_HOST_AND_PATH; | ||
/** | ||
* Proxy authentication | ||
* @type {RequestAuth} | ||
*/ | ||
auth: undefined, | ||
/** | ||
* This represents whether the tunneling needs to done while proxying this request. | ||
@@ -129,4 +138,8 @@ * @type Boolean | ||
_.isBoolean(options.tunnel) && (this.tunnel = options.tunnel); | ||
// todo: Add update method in parent class Property and call that here | ||
// @todo Add update method in parent class Property and call that here | ||
_.isBoolean(options.disabled) && (this.disabled = options.disabled); | ||
// only basic auth is supported | ||
// @todo add support for different authentication methods | ||
_.isFunction(options.auth && options.auth.toJSON) && (options.auth = options.auth.toJSON()); | ||
_.isObject(options.auth) && (this.auth = new RequestAuth(options.auth)); | ||
}, | ||
@@ -188,3 +201,10 @@ | ||
getProxyUrl: function () { | ||
return DEFAULT_PROTOCOL + PROTOCOL_HOST_SEPARATOR + this.host + COLON + this.port; | ||
var auth = E; | ||
if (this.auth && this.auth.type === BASIC_AUTH_METHOD) { | ||
auth = this.auth.current(); | ||
auth = auth.username + COLON + auth.password + AUTH_CREDENTIALS_SEPARATOR; | ||
} | ||
return DEFAULT_PROTOCOL + PROTOCOL_HOST_SEPARATOR + auth + this.host + COLON + this.port; | ||
}, | ||
@@ -191,0 +211,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"author": "Postman Labs <help@getpostman.com>", | ||
"version": "3.4.5", | ||
"version": "3.4.6-beta.1", | ||
"keywords": [ | ||
@@ -56,4 +56,4 @@ "postman" | ||
"dependency-check": "3.3.0", | ||
"eslint": "5.14.1", | ||
"eslint-plugin-jsdoc": "4.1.1", | ||
"eslint": "5.15.1", | ||
"eslint-plugin-jsdoc": "4.4.0", | ||
"eslint-plugin-lodash": "5.0.1", | ||
@@ -76,4 +76,4 @@ "eslint-plugin-mocha": "5.3.0", | ||
"postman-jsdoc-theme": "0.0.3", | ||
"postman-request": "2.88.1-postman.7", | ||
"puppeteer": "1.12.2", | ||
"postman-request": "2.88.1-postman.7.1", | ||
"puppeteer": "1.13.0", | ||
"recursive-readdir": "2.2.2", | ||
@@ -80,0 +80,0 @@ "require-all": "3.0.0", |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
495031
75
10566
1