ngx-cookie-service
Advanced tools
Comparing version 3.1.2 to 3.1.3
@@ -293,5 +293,4 @@ (function (global, factory) { | ||
* @param sameSite OWASP samesite token `Lax`, `None`, or `Strict`. Defaults to `Lax` | ||
* @param httpOnly HttpOnly flag | ||
*/ | ||
CookieService.prototype.set = function (name, value, expires, path, domain, secure, sameSite, httpOnly) { | ||
CookieService.prototype.set = function (name, value, expires, path, domain, secure, sameSite) { | ||
if (sameSite === void 0) { sameSite = 'Lax'; } | ||
@@ -325,10 +324,2 @@ if (!this.documentIsAccessible) { | ||
} | ||
if (httpOnly === false && sameSite === 'None') { | ||
httpOnly = true; | ||
console.warn("[ngx-cookie-service] Cookie " + name + " was forced with httpOnly flag because sameSite=None." + | ||
"More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130"); | ||
} | ||
if (httpOnly) { | ||
cookieString += 'HttpOnly;'; | ||
} | ||
cookieString += 'sameSite=' + sameSite + ';'; | ||
@@ -342,3 +333,3 @@ this.document.cookie = cookieString; | ||
*/ | ||
CookieService.prototype.delete = function (name, path, domain, secure, sameSite, httpOnly) { | ||
CookieService.prototype.delete = function (name, path, domain, secure, sameSite) { | ||
if (sameSite === void 0) { sameSite = 'Lax'; } | ||
@@ -348,3 +339,3 @@ if (!this.documentIsAccessible) { | ||
} | ||
this.set(name, '', new Date('Thu, 01 Jan 1970 00:00:01 GMT'), path, domain, secure, sameSite, httpOnly); | ||
this.set(name, '', new Date('Thu, 01 Jan 1970 00:00:01 GMT'), path, domain, secure, sameSite); | ||
}; | ||
@@ -355,3 +346,3 @@ /** | ||
*/ | ||
CookieService.prototype.deleteAll = function (path, domain, secure, sameSite, httpOnly) { | ||
CookieService.prototype.deleteAll = function (path, domain, secure, sameSite) { | ||
if (sameSite === void 0) { sameSite = 'Lax'; } | ||
@@ -364,3 +355,3 @@ if (!this.documentIsAccessible) { | ||
if (cookies.hasOwnProperty(cookieName)) { | ||
this.delete(cookieName, path, domain, secure, sameSite, httpOnly); | ||
this.delete(cookieName, path, domain, secure, sameSite); | ||
} | ||
@@ -367,0 +358,0 @@ } |
@@ -15,3 +15,3 @@ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-cookie-service",["exports","@angular/core","@angular/common"],t):t((e=e||self)["ngx-cookie-service"]={},e.ng.core,e.ng.common)}(this,(function(e,t,o){"use strict"; | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */function n(e,t){return function(o,n){t(o,n,e)}}function r(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return c}var i=function(){function e(e,t){this.document=e,this.platformId=t,this.documentIsAccessible=o.isPlatformBrowser(this.platformId)}return e.prototype.check=function(e){return!!this.documentIsAccessible&&(e=encodeURIComponent(e),this.getCookieRegExp(e).test(this.document.cookie))},e.prototype.get=function(e){if(this.documentIsAccessible&&this.check(e)){e=encodeURIComponent(e);var t=this.getCookieRegExp(e).exec(this.document.cookie);return this.safeDecodeURIComponent(t[1])}return""},e.prototype.getAll=function(){var e=this;if(!this.documentIsAccessible)return{};var t={},o=this.document;return o.cookie&&""!==o.cookie&&o.cookie.split(";").forEach((function(o){var n=r(o.split("="),2),i=n[0],c=n[1];t[e.safeDecodeURIComponent(i.replace(/^ /,""))]=e.safeDecodeURIComponent(c)})),t},e.prototype.set=function(e,t,o,n,r,i,c,s){if(void 0===c&&(c="Lax"),this.documentIsAccessible){var u=encodeURIComponent(e)+"="+encodeURIComponent(t)+";";if(o)if("number"==typeof o)u+="expires="+new Date((new Date).getTime()+1e3*o*60*60*24).toUTCString()+";";else u+="expires="+o.toUTCString()+";";n&&(u+="path="+n+";"),r&&(u+="domain="+r+";"),!1===i&&"None"===c&&(i=!0,console.warn("[ngx-cookie-service] Cookie "+e+" was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130")),i&&(u+="secure;"),!1===s&&"None"===c&&(s=!0,console.warn("[ngx-cookie-service] Cookie "+e+" was forced with httpOnly flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130")),s&&(u+="HttpOnly;"),u+="sameSite="+c+";",this.document.cookie=u}},e.prototype.delete=function(e,t,o,n,r,i){void 0===r&&(r="Lax"),this.documentIsAccessible&&this.set(e,"",new Date("Thu, 01 Jan 1970 00:00:01 GMT"),t,o,n,r,i)},e.prototype.deleteAll=function(e,t,o,n,r){if(void 0===n&&(n="Lax"),this.documentIsAccessible){var i=this.getAll();for(var c in i)i.hasOwnProperty(c)&&this.delete(c,e,t,o,n,r)}},e.prototype.getCookieRegExp=function(e){var t=e.replace(/([\[\]\{\}\(\)\|\=\;\+\?\,\.\*\^\$])/gi,"\\$1");return new RegExp("(?:^"+t+"|;\\s*"+t+")=(.*?)(?:;|$)","g")},e.prototype.safeDecodeURIComponent=function(e){try{return decodeURIComponent(e)}catch(t){return e}},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[o.DOCUMENT]}]},{type:t.InjectionToken,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(o.DOCUMENT),t.ɵɵinject(t.PLATFORM_ID))},token:e,providedIn:"root"}),e=function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c}([t.Injectable({providedIn:"root"}),n(0,t.Inject(o.DOCUMENT)),n(1,t.Inject(t.PLATFORM_ID))],e)}();e.CookieService=i,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
***************************************************************************** */function n(e,t){return function(o,n){t(o,n,e)}}function r(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,c=o.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=c.next()).done;)i.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}return i}var c=function(){function e(e,t){this.document=e,this.platformId=t,this.documentIsAccessible=o.isPlatformBrowser(this.platformId)}return e.prototype.check=function(e){return!!this.documentIsAccessible&&(e=encodeURIComponent(e),this.getCookieRegExp(e).test(this.document.cookie))},e.prototype.get=function(e){if(this.documentIsAccessible&&this.check(e)){e=encodeURIComponent(e);var t=this.getCookieRegExp(e).exec(this.document.cookie);return this.safeDecodeURIComponent(t[1])}return""},e.prototype.getAll=function(){var e=this;if(!this.documentIsAccessible)return{};var t={},o=this.document;return o.cookie&&""!==o.cookie&&o.cookie.split(";").forEach((function(o){var n=r(o.split("="),2),c=n[0],i=n[1];t[e.safeDecodeURIComponent(c.replace(/^ /,""))]=e.safeDecodeURIComponent(i)})),t},e.prototype.set=function(e,t,o,n,r,c,i){if(void 0===i&&(i="Lax"),this.documentIsAccessible){var s=encodeURIComponent(e)+"="+encodeURIComponent(t)+";";if(o)if("number"==typeof o)s+="expires="+new Date((new Date).getTime()+1e3*o*60*60*24).toUTCString()+";";else s+="expires="+o.toUTCString()+";";n&&(s+="path="+n+";"),r&&(s+="domain="+r+";"),!1===c&&"None"===i&&(c=!0,console.warn("[ngx-cookie-service] Cookie "+e+" was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130")),c&&(s+="secure;"),s+="sameSite="+i+";",this.document.cookie=s}},e.prototype.delete=function(e,t,o,n,r){void 0===r&&(r="Lax"),this.documentIsAccessible&&this.set(e,"",new Date("Thu, 01 Jan 1970 00:00:01 GMT"),t,o,n,r)},e.prototype.deleteAll=function(e,t,o,n){if(void 0===n&&(n="Lax"),this.documentIsAccessible){var r=this.getAll();for(var c in r)r.hasOwnProperty(c)&&this.delete(c,e,t,o,n)}},e.prototype.getCookieRegExp=function(e){var t=e.replace(/([\[\]\{\}\(\)\|\=\;\+\?\,\.\*\^\$])/gi,"\\$1");return new RegExp("(?:^"+t+"|;\\s*"+t+")=(.*?)(?:;|$)","g")},e.prototype.safeDecodeURIComponent=function(e){try{return decodeURIComponent(e)}catch(t){return e}},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[o.DOCUMENT]}]},{type:t.InjectionToken,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(o.DOCUMENT),t.ɵɵinject(t.PLATFORM_ID))},token:e,providedIn:"root"}),e=function(e,t,o,n){var r,c=arguments.length,i=c<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(i=(c<3?r(i):c>3?r(t,o,i):r(t,o))||i);return c>3&&i&&Object.defineProperty(t,o,i),i}([t.Injectable({providedIn:"root"}),n(0,t.Inject(o.DOCUMENT)),n(1,t.Inject(t.PLATFORM_ID))],e)}();e.CookieService=c,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=ngx-cookie-service.umd.min.js.map |
@@ -75,5 +75,4 @@ import { __decorate, __param } from "tslib"; | ||
* @param sameSite OWASP samesite token `Lax`, `None`, or `Strict`. Defaults to `Lax` | ||
* @param httpOnly HttpOnly flag | ||
*/ | ||
set(name, value, expires, path, domain, secure, sameSite = 'Lax', httpOnly) { | ||
set(name, value, expires, path, domain, secure, sameSite = 'Lax') { | ||
if (!this.documentIsAccessible) { | ||
@@ -106,10 +105,2 @@ return; | ||
} | ||
if (httpOnly === false && sameSite === 'None') { | ||
httpOnly = true; | ||
console.warn(`[ngx-cookie-service] Cookie ${name} was forced with httpOnly flag because sameSite=None.` + | ||
`More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`); | ||
} | ||
if (httpOnly) { | ||
cookieString += 'HttpOnly;'; | ||
} | ||
cookieString += 'sameSite=' + sameSite + ';'; | ||
@@ -123,7 +114,7 @@ this.document.cookie = cookieString; | ||
*/ | ||
delete(name, path, domain, secure, sameSite = 'Lax', httpOnly) { | ||
delete(name, path, domain, secure, sameSite = 'Lax') { | ||
if (!this.documentIsAccessible) { | ||
return; | ||
} | ||
this.set(name, '', new Date('Thu, 01 Jan 1970 00:00:01 GMT'), path, domain, secure, sameSite, httpOnly); | ||
this.set(name, '', new Date('Thu, 01 Jan 1970 00:00:01 GMT'), path, domain, secure, sameSite); | ||
} | ||
@@ -134,3 +125,3 @@ /** | ||
*/ | ||
deleteAll(path, domain, secure, sameSite = 'Lax', httpOnly) { | ||
deleteAll(path, domain, secure, sameSite = 'Lax') { | ||
if (!this.documentIsAccessible) { | ||
@@ -142,3 +133,3 @@ return; | ||
if (cookies.hasOwnProperty(cookieName)) { | ||
this.delete(cookieName, path, domain, secure, sameSite, httpOnly); | ||
this.delete(cookieName, path, domain, secure, sameSite); | ||
} | ||
@@ -178,2 +169,2 @@ } | ||
export { CookieService }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29va2llLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtY29va2llLXNlcnZpY2UvIiwic291cmNlcyI6WyJsaWIvY29va2llLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDJGQUEyRjtBQUMzRiwyRkFBMkY7QUFDM0YsZ0RBQWdEO0FBRWhELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxFQUFFLFdBQVcsRUF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AgICBodHRwT25seT86IGJvb2xlYW5cbiAgKTogdm9pZCB7XG4gICAgaWYgKCF0aGlzLmRvY3VtZW50SXNBY2Nlc3NpYmxlKSB7XG4gICAgICByZXR1cm47XG4gICAgfVxuXG4gICAgbGV0IGNvb2tpZVN0cmluZzogc3RyaW5nID0gZW5jb2RlVVJJQ29tcG9uZW50KG5hbWUpICsgJz0nICsgZW5jb2RlVVJJQ29tcG9uZW50KHZhbHVlKSArICc7JztcblxuICAgIGlmIChleHBpcmVzKSB7XG4gICAgICBpZiAodHlwZW9mIGV4cGlyZXMgPT09ICdudW1iZXInKSB7XG4gICAgICAgIGNvbnN0IGRhdGVFeHBpcmVzOiBEYXRlID0gbmV3IERhdGUobmV3IERhdGUoKS5nZXRUaW1lKCkgKyBleHBpcmVzICogMTAwMCAqIDYwICogNjAgKiAyNCk7XG5cbiAgICAgICAgY29va2llU3RyaW5nICs9ICdleHBpcmVzPScgKyBkYXRlRXhwaXJlcy50b1VUQ1N0cmluZygpICsgJzsnO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgY29va2llU3RyaW5nICs9ICdleHBpcmVzPScgKyBleHBpcmVzLnRvVVRDU3RyaW5nKCkgKyAnOyc7XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKHBhdGgpIHtcbiAgICAgIGNvb2tpZVN0cmluZyArPSAncGF0aD0nICsgcGF0aCArICc7JztcbiAgICB9XG5cbiAgICBpZiAoZG9tYWluKSB7XG4gICAgICBjb29raWVTdHJpbmcgKz0gJ2RvbWFpbj0nICsgZG9tYWluICsgJzsnO1xuICAgIH1cblxuICAgIGlmIChzZWN1cmUgPT09IGZhbHNlICYmIHNhbWVTaXRlID09PSAnTm9uZScpIHtcbiAgICAgIHNlY3VyZSA9IHRydWU7XG4gICAgICBjb25zb2xlLndhcm4oXG4gICAgICAgIGBbbmd4LWNvb2tpZS1zZXJ2aWNlXSBDb29raWUgJHtuYW1lfSB3YXMgZm9yY2VkIHdpdGggc2VjdXJlIGZs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biAgICB9XG4gIH1cblxuICAvKipcbiAgICogQHBhcmFtIG5hbWUgQ29va2llIG5hbWVcbiAgICogQHJldHVybnMgcHJvcGVydHkgUmVnRXhwXG4gICAqL1xuICBwcml2YXRlIGdldENvb2tpZVJlZ0V4cChuYW1lOiBzdHJpbmcpOiBSZWdFeHAge1xuICAgIGNvbnN0IGVzY2FwZWROYW1lOiBzdHJpbmcgPSBuYW1lLnJlcGxhY2UoLyhbXFxbXFxdXFx7XFx9XFwoXFwpXFx8XFw9XFw7XFwrXFw/XFwsXFwuXFwqXFxeXFwkXSkvZ2ksICdcXFxcJDEnKTtcblxuICAgIHJldHVybiBuZXcgUmVnRXhwKCcoPzpeJyArIGVzY2FwZWROYW1lICsgJ3w7XFxcXHMqJyArIGVzY2FwZWROYW1lICsgJyk9KC4qPykoPzo7fCQpJywgJ2cnKTtcbiAgfVxuXG4gIHByaXZhdGUgc2FmZURlY29kZVVSSUNvbXBvbmVudChlbmNvZGVkVVJJQ29tcG9uZW50OiBzdHJpbmcpOiBzdHJpbmcge1xuICAgIHRyeSB7XG4gICAgICByZXR1cm4gZGVjb2RlVVJJQ29tcG9uZW50KGVuY29kZWRVUklDb21wb25lbnQpO1xuICAgIH0gY2F0Y2gge1xuICAgICAgLy8gcHJvYmFibHkgaXQgaXMgbm90IHVyaSBlbmNvZGVkLiByZXR1cm4gYXMgaXNcbiAgICAgIHJldHVybiBlbmNvZGVkVVJJQ29tcG9uZW50O1xuICAgIH1cbiAgfVxufVxuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29va2llLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtY29va2llLXNlcnZpY2UvIiwic291cmNlcyI6WyJsaWIvY29va2llLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDJGQUEyRjtBQUMzRiwyRkFBMkY7QUFDM0YsZ0RBQWdEO0FBR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JlZ0V4cCA9IHRoaXMuZ2V0Q29va2llUmVnRXhwKG5hbWUpO1xuICAgICAgY29uc3QgcmVzdWx0OiBSZWdFeHBFeGVjQXJyYXkgPSByZWdFeHAuZXhlYyh0aGlzLmRvY3VtZW50LmNvb2tpZSk7XG5cbiAgICAgIHJldHVybiB0aGlzLnNhZmVEZWNvZGVVUklDb21wb25lbnQocmVzdWx0WzFdKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuICcnO1xuICAgIH1cbiAgfVxuXG4gIC8qKlxuICAgKiBAcmV0dXJucyBhbGwgdGhlIGNvb2tpZXMgaW4ganNvblxuICAgKi9cbiAgZ2V0QWxsKCk6IHsgW2tleTogc3RyaW5nXTogc3RyaW5nIH0ge1xuICAgIGlmICghdGhpcy5kb2N1bWVudElzQWNjZXNzaWJsZSkge1xuICAgICAgcmV0dXJuIHt9O1xuICAgIH1cblxuICAgIGNvbnN0IGNvb2tpZXM6IHsgW2tleTogc3RyaW5nXTogc3RyaW5nIH0gPSB7fTtcbiAgICBjb25zdCBkb2N1bWVudDogYW55ID0gdGhpcy5kb2N1bWVudDtcblxuICAgIGlmIChkb2N1bWVudC5jb29raWUgJiYgZG9jdW1lbnQuY29va2llICE9PSAnJykge1xuICAgICAgZG9jdW1lbnQuY29va2llLnNwbGl0KCc7JykuZm9yRWFjaCgoY3VycmVudENvb2tpZSkgPT4ge1xuICAgICAgICBjb25zdCBbY29va2llTmFtZSwgY29va2llVmFsdWVdID0gY3VycmVudENvb2tpZS5zcGxpdCgnPScpO1xuICAgICAgICBjb29raWVzW3RoaXMuc2FmZURlY29kZVVSSUNvbXBvbmVudChjb29raWVOYW1lLnJlcGxhY2UoL14gLywgJycpKV0gPSB0aGlzLnNhZmVEZWNvZGVVUklDb21wb25lbnQoY29va2llVmFsdWUpO1xuICAgICAgfSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIGNvb2tpZXM7XG4gIH1cblxuICAvKipcbiAgICogQHBhcmFtIG5hbWUgICAg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haW4sIHNlY3VyZSwgc2FtZVNpdGUpO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIC8qKlxuICAgKiBAcGFyYW0gbmFtZSBDb29raWUgbmFtZVxuICAgKiBAcmV0dXJucyBwcm9wZXJ0eSBSZWdFeHBcbiAgICovXG4gIHByaXZhdGUgZ2V0Q29va2llUmVnRXhwKG5hbWU6IHN0cmluZyk6IFJlZ0V4cCB7XG4gICAgY29uc3QgZXNjYXBlZE5hbWU6IHN0cmluZyA9IG5hbWUucmVwbGFjZSgvKFtcXFtcXF1cXHtcXH1cXChcXClcXHxcXD1cXDtcXCtcXD9cXCxcXC5cXCpcXF5cXCRdKS9naSwgJ1xcXFwkMScpO1xuXG4gICAgcmV0dXJuIG5ldyBSZWdFeHAoJyg/Ol4nICsgZXNjYXBlZE5hbWUgKyAnfDtcXFxccyonICsgZXNjYXBlZE5hbWUgKyAnKT0oLio/KSg/Ojt8JCknLCAnZycpO1xuICB9XG5cbiAgcHJpdmF0ZSBzYWZlRGVjb2RlVVJJQ29tcG9uZW50KGVuY29kZWRVUklDb21wb25lbnQ6IHN0cmluZyk6IHN0cmluZyB7XG4gICAgdHJ5IHtcbiAgICAgIHJldHVybiBkZWNvZGVVUklDb21wb25lbnQoZW5jb2RlZFVSSUNvbXBvbmVudCk7XG4gICAgfSBjYXRjaCB7XG4gICAgICAvLyBwcm9iYWJseSBpdCBpcyBub3QgdXJpIGVuY29kZWQuIHJldHVybiBhcyBpc1xuICAgICAgcmV0dXJuIGVuY29kZWRVUklDb21wb25lbnQ7XG4gICAgfVxuICB9XG59XG4iXX0= |
@@ -76,5 +76,4 @@ import { __decorate, __param, __read } from "tslib"; | ||
* @param sameSite OWASP samesite token `Lax`, `None`, or `Strict`. Defaults to `Lax` | ||
* @param httpOnly HttpOnly flag | ||
*/ | ||
CookieService.prototype.set = function (name, value, expires, path, domain, secure, sameSite, httpOnly) { | ||
CookieService.prototype.set = function (name, value, expires, path, domain, secure, sameSite) { | ||
if (sameSite === void 0) { sameSite = 'Lax'; } | ||
@@ -108,10 +107,2 @@ if (!this.documentIsAccessible) { | ||
} | ||
if (httpOnly === false && sameSite === 'None') { | ||
httpOnly = true; | ||
console.warn("[ngx-cookie-service] Cookie " + name + " was forced with httpOnly flag because sameSite=None." + | ||
"More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130"); | ||
} | ||
if (httpOnly) { | ||
cookieString += 'HttpOnly;'; | ||
} | ||
cookieString += 'sameSite=' + sameSite + ';'; | ||
@@ -125,3 +116,3 @@ this.document.cookie = cookieString; | ||
*/ | ||
CookieService.prototype.delete = function (name, path, domain, secure, sameSite, httpOnly) { | ||
CookieService.prototype.delete = function (name, path, domain, secure, sameSite) { | ||
if (sameSite === void 0) { sameSite = 'Lax'; } | ||
@@ -131,3 +122,3 @@ if (!this.documentIsAccessible) { | ||
} | ||
this.set(name, '', new Date('Thu, 01 Jan 1970 00:00:01 GMT'), path, domain, secure, sameSite, httpOnly); | ||
this.set(name, '', new Date('Thu, 01 Jan 1970 00:00:01 GMT'), path, domain, secure, sameSite); | ||
}; | ||
@@ -138,3 +129,3 @@ /** | ||
*/ | ||
CookieService.prototype.deleteAll = function (path, domain, secure, sameSite, httpOnly) { | ||
CookieService.prototype.deleteAll = function (path, domain, secure, sameSite) { | ||
if (sameSite === void 0) { sameSite = 'Lax'; } | ||
@@ -147,3 +138,3 @@ if (!this.documentIsAccessible) { | ||
if (cookies.hasOwnProperty(cookieName)) { | ||
this.delete(cookieName, path, domain, secure, sameSite, httpOnly); | ||
this.delete(cookieName, path, domain, secure, sameSite); | ||
} | ||
@@ -184,2 +175,2 @@ } | ||
export { CookieService }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29va2llLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtY29va2llLXNlcnZpY2UvIiwic291cmNlcyI6WyJsaWIvY29va2llLnNlcnZpY2UudHMiXSw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5nXTogc3RyaW5nIH0gPSB7fTtcbiAgICBjb25zdCBkb2N1bWVudDogYW55ID0gdGhpcy5kb2N1bWVudDtcblxuICAgIGlmIChkb2N1bWVudC5jb29raWUgJiYgZG9jdW1lbnQuY29va2llICE9PSAnJykge1xuICAgICAgZG9jdW1lbnQuY29va2llLnNwbGl0KCc7JykuZm9yRWFjaCgoY3VycmVudENvb2tpZSkgPT4ge1xuICAgICAgICBjb25zdCBbY29va2llTmFtZSwgY29va2llVmFsdWVdID0gY3VycmVudENvb2tpZS5zcGxpdCgnPScpO1xuICAgICAgICBjb29raWVzW3RoaXMuc2FmZURlY29kZVVSSUNvbXBvbmVudChjb29raWVOYW1lLnJlcGxhY2UoL14gLywgJycpKV0gPSB0aGlzLnNhZmVEZWNvZGVVUklDb21wb25lbnQoY29va2llVmFsdWUpO1xuICAgICAgfSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIGNvb2tpZXM7XG4gIH1cblxuICAvKipcbiAgICogQHBhcmFtIG5hbWUgICAgIENvb2tpZSBuYW1lXG4gICAqIEBwYXJhbSB2YWx1ZSAgICBDb29raWUgdmFsdWVcbiAgICogQHBhcmFtIGV4cGlyZXMgIE51bWJlciBvZiBkYXlzIHVudGlsIHRoZSBjb29raWVzIGV4cGlyZXMgb3IgYW4gYWN0dWFsIGBEYXRlYFxuICAgKiBAcGFyYW0gcGF0aCAgICAgQ29va2llIHBhdGhcbiAgICogQHBhcmFtIGRvbWFpbiAgIENvb2tpZSBkb21haW5cbiAgICogQHBhcmFtIHNlY3VyZSAgIFNlY3VyZSBmbGFnXG4gICAqIEBwYXJhbSBzYW1lU2l0ZSBPV0FTUCBzYW1lc2l0ZSB0b2tlbiBgTGF4YCwgYE5vbmVgLCBvciBgU3RyaWN0YC4gRGVmYXVsdHMgdG8gYExheGBcbiAgICogQHBhcmFtIGh0dHBPbmx5IEh0dHBPbmx5IGZsYWdcbiAgICovXG4gIHNldChcbiAgICBuYW1lOiBzdHJpbmcsXG4gICAgdmFsdWU6IHN0cmluZyxcbiAgICBleHBpcmVzPzogbnVtYmVyIHwgRGF0ZSxcbiAgICBwYXRoPzogc3RyaW5nLFxuICAgIGRvbWFpbj86IHN0cmluZyxcbiAgICBzZWN1cmU/OiBib29sZWFuLFxuICAgIHNhbWVTaXRlOiAnTGF4JyB8ICdOb25lJyB8ICdTdHJpY3QnID0gJ0xheCcsXG4gICAgaHR0cE9ubHk/OiBib29sZWFuXG4gICk6IHZvaWQge1xuICAgIGlmICghdGhpcy5kb2N1bWVudElzQWNjZXNzaWJsZSkge1xuICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIGxldCBjb29raWVTdHJpbmc6IHN0cmluZyA9IGVuY29kZVVSSUNvbXBvbmVudChuYW1lKSArICc9JyArIGVuY29kZVVSSUNvbXBvbmVudCh2YWx1ZSkgKyAnOyc7XG5cbiAgICBpZiAoZXhwaXJlcykge1xuICAgICAgaWYgKHR5cGVvZiBleHBpcmVzID09PSAnbnVtYmVyJykge1xuICAgICAgICBjb25zdCBkYXRlRXhwaXJlczogRGF0ZSA9IG5ldyBEYXRlKG5ldyBEYXRlKCkuZ2V0VGltZSgpICsgZXhwaXJlcyAqIDEwMDAgKiA2MCAqIDYwICogMjQpO1xuXG4gICAgICAgIGNvb2tpZVN0cmluZyArPSAnZXhwaXJlcz0nICsgZGF0ZUV4cGlyZXMudG9VVENTdHJpbmcoKSArICc7JztcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGNvb2tpZVN0cmluZyArPSAnZXhwaXJlcz0nICsgZXhwaXJlcy50b1VUQ1N0cmluZygpICsgJzsnO1xuICAgICAgfVxuICAgIH1cblxuICAgIGlmIChwYXRoKSB7XG4gICAgICBjb29raWVTdHJpbmcgKz0gJ3BhdGg9JyArIHBhdGggKyAnOyc7XG4gICAgfVxuXG4gICAgaWYgKGRvbWFpbikge1xuICAgICAgY29va2llU3RyaW5nICs9ICdkb21haW49JyArIGRvbWFpbiArICc7JztcbiAgICB9XG5cbiAgICBpZi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0IGNvb2tpZU5hbWUgaW4gY29va2llcykge1xuICAgICAgaWYgKGNvb2tpZXMuaGFzT3duUHJvcGVydHkoY29va2llTmFtZSkpIHtcbiAgICAgICAgdGhpcy5kZWxldGUoY29va2llTmFtZSwgcGF0aCwgZG9tYWluLCBzZWN1cmUsIHNhbWVTaXRlLCBodHRwT25seSk7XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgLyoqXG4gICAqIEBwYXJhbSBuYW1lIENvb2tpZSBuYW1lXG4gICAqIEByZXR1cm5zIHByb3BlcnR5IFJlZ0V4cFxuICAgKi9cbiAgcHJpdmF0ZSBnZXRDb29raWVSZWdFeHAobmFtZTogc3RyaW5nKTogUmVnRXhwIHtcbiAgICBjb25zdCBlc2NhcGVkTmFtZTogc3RyaW5nID0gbmFtZS5yZXBsYWNlKC8oW1xcW1xcXVxce1xcfVxcKFxcKVxcfFxcPVxcO1xcK1xcP1xcLFxcLlxcKlxcXlxcJF0pL2dpLCAnXFxcXCQxJyk7XG5cbiAgICByZXR1cm4gbmV3IFJlZ0V4cCgnKD86XicgKyBlc2NhcGVkTmFtZSArICd8O1xcXFxzKicgKyBlc2NhcGVkTmFtZSArICcpPSguKj8pKD86O3wkKScsICdnJyk7XG4gIH1cblxuICBwcml2YXRlIHNhZmVEZWNvZGVVUklDb21wb25lbnQoZW5jb2RlZFVSSUNvbXBvbmVudDogc3RyaW5nKTogc3RyaW5nIHtcbiAgICB0cnkge1xuICAgICAgcmV0dXJuIGRlY29kZVVSSUNvbXBvbmVudChlbmNvZGVkVVJJQ29tcG9uZW50KTtcbiAgICB9IGNhdGNoIHtcbiAgICAgIC8vIHByb2JhYmx5IGl0IGlzIG5vdCB1cmkgZW5jb2RlZC4gcmV0dXJuIGFzIGlzXG4gICAgICByZXR1cm4gZW5jb2RlZFVSSUNvbXBvbmVudDtcbiAgICB9XG4gIH1cbn1cbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjo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ZSkge1xuICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIGxldCBjb29raWVTdHJpbmc6IHN0cmluZyA9IGVuY29kZVVSSUNvbXBvbmVudChuYW1lKSArICc9JyArIGVuY29kZVVSSUNvbXBvbmVudCh2YWx1ZSkgKyAnOyc7XG5cbiAgICBpZiAoZXhwaXJlcykge1xuICAgICAgaWYgKHR5cGVvZiBleHBpcmVzID09PSAnbnVtYmVyJykge1xuICAgICAgICBjb25zdCBkYXRlRXhwaXJlczogRGF0ZSA9IG5ldyBEYXRlKG5ldyBEYXRlKCkuZ2V0VGltZSgpICsgZXhwaXJlcyAqIDEwMDAgKiA2MCAqIDYwICogMjQpO1xuXG4gICAgICAgIGNvb2tpZVN0cmluZyArPSAnZXhwaXJlcz0nICsgZGF0ZUV4cGlyZXMudG9VVENTdHJpbmcoKSArICc7JztcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGNvb2tpZVN0cmluZyArPSAnZXhwaXJlcz0nICsgZXhwaXJlcy50b1VUQ1N0cmluZygpICsgJzsnO1xuICAgICAgfVxuICAgIH1cblxuICAgIGlmIChwYXRoKSB7XG4gICAgICBjb29raWVTdHJpbmcgKz0gJ3BhdGg9JyArIHBhdGggKyAnOyc7XG4gICAgfVxuXG4gICAgaWYgKGRvbWFpbikge1xuICAgICAgY29va2llU3RyaW5nICs9ICdkb21haW49JyArIGRvbWFpbiArICc7JztcbiAgICB9XG5cbiAgICBpZiAoc2VjdXJlID09PSBmYWxzZSAmJiBzYW1lU2l0ZSA9PT0gJ05vbmUnKSB7XG4gICAgICBzZWN1cmUgPSB0cnVlO1xuICAgICAgY29uc29sZS53YXJuKFxuICAgICAgICBgW25neC1jb29raWUtc2VydmljZV0gQ29va2llICR7bmFtZX0gd2FzIGZvcmNlZCB3aXRoIHNlY3VyZSBmbGFnIGJlY2F1c2Ugc2FtZVNpdGU9Tm9uZS5gICtcbiAgICAgICAgICBgTW9yZSBkZXRhaWxzIDogaHR0cHM6Ly9naXRodWI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gcHJvYmFibHkgaXQgaXMgbm90IHVyaSBlbmNvZGVkLiByZXR1cm4gYXMgaXNcbiAgICAgIHJldHVybiBlbmNvZGVkVVJJQ29tcG9uZW50O1xuICAgIH1cbiAgfVxufVxuIl19 |
@@ -71,5 +71,4 @@ import { __decorate, __param } from 'tslib'; | ||
* @param sameSite OWASP samesite token `Lax`, `None`, or `Strict`. Defaults to `Lax` | ||
* @param httpOnly HttpOnly flag | ||
*/ | ||
set(name, value, expires, path, domain, secure, sameSite = 'Lax', httpOnly) { | ||
set(name, value, expires, path, domain, secure, sameSite = 'Lax') { | ||
if (!this.documentIsAccessible) { | ||
@@ -102,10 +101,2 @@ return; | ||
} | ||
if (httpOnly === false && sameSite === 'None') { | ||
httpOnly = true; | ||
console.warn(`[ngx-cookie-service] Cookie ${name} was forced with httpOnly flag because sameSite=None.` + | ||
`More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`); | ||
} | ||
if (httpOnly) { | ||
cookieString += 'HttpOnly;'; | ||
} | ||
cookieString += 'sameSite=' + sameSite + ';'; | ||
@@ -119,7 +110,7 @@ this.document.cookie = cookieString; | ||
*/ | ||
delete(name, path, domain, secure, sameSite = 'Lax', httpOnly) { | ||
delete(name, path, domain, secure, sameSite = 'Lax') { | ||
if (!this.documentIsAccessible) { | ||
return; | ||
} | ||
this.set(name, '', new Date('Thu, 01 Jan 1970 00:00:01 GMT'), path, domain, secure, sameSite, httpOnly); | ||
this.set(name, '', new Date('Thu, 01 Jan 1970 00:00:01 GMT'), path, domain, secure, sameSite); | ||
} | ||
@@ -130,3 +121,3 @@ /** | ||
*/ | ||
deleteAll(path, domain, secure, sameSite = 'Lax', httpOnly) { | ||
deleteAll(path, domain, secure, sameSite = 'Lax') { | ||
if (!this.documentIsAccessible) { | ||
@@ -138,3 +129,3 @@ return; | ||
if (cookies.hasOwnProperty(cookieName)) { | ||
this.delete(cookieName, path, domain, secure, sameSite, httpOnly); | ||
this.delete(cookieName, path, domain, secure, sameSite); | ||
} | ||
@@ -141,0 +132,0 @@ } |
@@ -72,5 +72,4 @@ import { __read, __decorate, __param } from 'tslib'; | ||
* @param sameSite OWASP samesite token `Lax`, `None`, or `Strict`. Defaults to `Lax` | ||
* @param httpOnly HttpOnly flag | ||
*/ | ||
CookieService.prototype.set = function (name, value, expires, path, domain, secure, sameSite, httpOnly) { | ||
CookieService.prototype.set = function (name, value, expires, path, domain, secure, sameSite) { | ||
if (sameSite === void 0) { sameSite = 'Lax'; } | ||
@@ -104,10 +103,2 @@ if (!this.documentIsAccessible) { | ||
} | ||
if (httpOnly === false && sameSite === 'None') { | ||
httpOnly = true; | ||
console.warn("[ngx-cookie-service] Cookie " + name + " was forced with httpOnly flag because sameSite=None." + | ||
"More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130"); | ||
} | ||
if (httpOnly) { | ||
cookieString += 'HttpOnly;'; | ||
} | ||
cookieString += 'sameSite=' + sameSite + ';'; | ||
@@ -121,3 +112,3 @@ this.document.cookie = cookieString; | ||
*/ | ||
CookieService.prototype.delete = function (name, path, domain, secure, sameSite, httpOnly) { | ||
CookieService.prototype.delete = function (name, path, domain, secure, sameSite) { | ||
if (sameSite === void 0) { sameSite = 'Lax'; } | ||
@@ -127,3 +118,3 @@ if (!this.documentIsAccessible) { | ||
} | ||
this.set(name, '', new Date('Thu, 01 Jan 1970 00:00:01 GMT'), path, domain, secure, sameSite, httpOnly); | ||
this.set(name, '', new Date('Thu, 01 Jan 1970 00:00:01 GMT'), path, domain, secure, sameSite); | ||
}; | ||
@@ -134,3 +125,3 @@ /** | ||
*/ | ||
CookieService.prototype.deleteAll = function (path, domain, secure, sameSite, httpOnly) { | ||
CookieService.prototype.deleteAll = function (path, domain, secure, sameSite) { | ||
if (sameSite === void 0) { sameSite = 'Lax'; } | ||
@@ -143,3 +134,3 @@ if (!this.documentIsAccessible) { | ||
if (cookies.hasOwnProperty(cookieName)) { | ||
this.delete(cookieName, path, domain, secure, sameSite, httpOnly); | ||
this.delete(cookieName, path, domain, secure, sameSite); | ||
} | ||
@@ -146,0 +137,0 @@ } |
@@ -31,5 +31,4 @@ import { InjectionToken } from '@angular/core'; | ||
* @param sameSite OWASP samesite token `Lax`, `None`, or `Strict`. Defaults to `Lax` | ||
* @param httpOnly HttpOnly flag | ||
*/ | ||
set(name: string, value: string, expires?: number | Date, path?: string, domain?: string, secure?: boolean, sameSite?: 'Lax' | 'None' | 'Strict', httpOnly?: boolean): void; | ||
set(name: string, value: string, expires?: number | Date, path?: string, domain?: string, secure?: boolean, sameSite?: 'Lax' | 'None' | 'Strict'): void; | ||
/** | ||
@@ -40,3 +39,3 @@ * @param name Cookie name | ||
*/ | ||
delete(name: string, path?: string, domain?: string, secure?: boolean, sameSite?: 'Lax' | 'None' | 'Strict', httpOnly?: boolean): void; | ||
delete(name: string, path?: string, domain?: string, secure?: boolean, sameSite?: 'Lax' | 'None' | 'Strict'): void; | ||
/** | ||
@@ -46,3 +45,3 @@ * @param path Cookie path | ||
*/ | ||
deleteAll(path?: string, domain?: string, secure?: boolean, sameSite?: 'Lax' | 'None' | 'Strict', httpOnly?: boolean): void; | ||
deleteAll(path?: string, domain?: string, secure?: boolean, sameSite?: 'Lax' | 'None' | 'Strict'): void; | ||
/** | ||
@@ -49,0 +48,0 @@ * @param name Cookie name |
{ | ||
"name": "ngx-cookie-service", | ||
"description": "an (aot ready) angular (4.2+) cookie service", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": "Stepan Suvorov <stevermeister@gmail.com>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
158493
1123