How to use the tough-cookie.MemoryCookieStore.prototype function in tough-cookie

To help you get started, we’ve selected a few tough-cookie examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pmarkert / hyperpotamus / lib / cookieStore.js View on Github external
HyperpotamusCookieStore.prototype.findCookies = function (domain, path, cb) {
	var idx = this.idx;
	MemoryCookieStore.prototype.findCookies.call(this, domain, path, function (err, results) {
		if (err) {
			return cb(err);
		}

		var domainIndex = idx["*"];
		if (domainIndex) {
			if (!path) {
				// null means "all paths"
				for (var curPath in domainIndex) {
					var pathIndex = domainIndex[curPath];
					for (var key in pathIndex) {
						results.push(_.defaults({ domain }, _.clone(pathIndex[key])));
					}
				}
			}
			else {