@auth0/angular-jwt
Advanced tools
Comparing version 4.1.1 to 4.1.2
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"JwtInterceptor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":14,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":27,"character":5},"arguments":[{"__symbolic":"reference","name":"JWT_OPTIONS"}]}],null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"JwtHelperService"}]}],"isWhitelistedDomain":[{"__symbolic":"method"}],"isBlacklistedRoute":[{"__symbolic":"method"}],"handleInterception":[{"__symbolic":"method"}],"intercept":[{"__symbolic":"method"}]}},"JwtHelperService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":9,"character":15},"arguments":[{"__symbolic":"reference","name":"JWT_OPTIONS"}]}]],"parameters":[null]}],"urlBase64Decode":[{"__symbolic":"method"}],"b64decode":[{"__symbolic":"method"}],"b64DecodeUnicode":[{"__symbolic":"method"}],"decodeToken":[{"__symbolic":"method"}],"getTokenExpirationDate":[{"__symbolic":"method"}],"isTokenExpired":[{"__symbolic":"method"}]}},"JWT_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":31},"arguments":["JWT_OPTIONS"]},"JwtModuleOptions":{"__symbolic":"interface"},"JwtModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":27,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":29,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":29,"character":27}}]],"parameters":[{"__symbolic":"reference","name":"JwtModule"}]}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["options"],"value":{"ngModule":{"__symbolic":"reference","name":"JwtModule"},"providers":[{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HTTP_INTERCEPTORS","line":41,"character":19},"useClass":{"__symbolic":"reference","name":"JwtInterceptor"},"multi":true},{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"jwtOptionsProvider"},"right":{"provide":{"__symbolic":"reference","name":"JWT_OPTIONS"},"useValue":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"config"}}},{"__symbolic":"reference","name":"JwtHelperService"}]}}}}},"origins":{"JwtInterceptor":"./lib/jwt.interceptor","JwtHelperService":"./lib/jwthelper.service","JWT_OPTIONS":"./lib/jwtoptions.token","JwtModuleOptions":"./lib/angular-jwt.module","JwtModule":"./lib/angular-jwt.module"},"importAs":"@auth0/angular-jwt"} | ||
{"__symbolic":"module","version":4,"metadata":{"JwtInterceptor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":14,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":28,"character":5},"arguments":[{"__symbolic":"reference","name":"JWT_OPTIONS"}]}],null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"JwtHelperService"}]}],"isWhitelistedDomain":[{"__symbolic":"method"}],"isBlacklistedRoute":[{"__symbolic":"method"}],"handleInterception":[{"__symbolic":"method"}],"intercept":[{"__symbolic":"method"}]}},"JwtHelperService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":9,"character":15},"arguments":[{"__symbolic":"reference","name":"JWT_OPTIONS"}]}]],"parameters":[null]}],"urlBase64Decode":[{"__symbolic":"method"}],"b64decode":[{"__symbolic":"method"}],"b64DecodeUnicode":[{"__symbolic":"method"}],"decodeToken":[{"__symbolic":"method"}],"getTokenExpirationDate":[{"__symbolic":"method"}],"isTokenExpired":[{"__symbolic":"method"}]}},"JWT_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":31},"arguments":["JWT_OPTIONS"]},"JwtModuleOptions":{"__symbolic":"interface"},"JwtModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":27,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":29,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":29,"character":27}}]],"parameters":[{"__symbolic":"reference","name":"JwtModule"}]}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["options"],"value":{"ngModule":{"__symbolic":"reference","name":"JwtModule"},"providers":[{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HTTP_INTERCEPTORS","line":41,"character":19},"useClass":{"__symbolic":"reference","name":"JwtInterceptor"},"multi":true},{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"jwtOptionsProvider"},"right":{"provide":{"__symbolic":"reference","name":"JWT_OPTIONS"},"useValue":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"config"}}},{"__symbolic":"reference","name":"JwtHelperService"}]}}}}},"origins":{"JwtInterceptor":"./lib/jwt.interceptor","JwtHelperService":"./lib/jwthelper.service","JWT_OPTIONS":"./lib/jwtoptions.token","JwtModuleOptions":"./lib/angular-jwt.module","JwtModule":"./lib/angular-jwt.module"},"importAs":"@auth0/angular-jwt"} |
@@ -317,2 +317,3 @@ (function (global, factory) { | ||
this.jwtHelper = jwtHelper; | ||
this.standardPorts = ["80", "443"]; | ||
this.tokenGetter = config.tokenGetter; | ||
@@ -331,8 +332,13 @@ this.headerName = config.headerName || "Authorization"; | ||
var requestUrl = url.parse(request.url, false, true); | ||
return (requestUrl.hostname === null || | ||
var hostName = requestUrl.hostname !== null | ||
? "" + requestUrl.hostname + (requestUrl.port && !this.standardPorts.includes(requestUrl.port) | ||
? ":" + requestUrl.port | ||
: "") | ||
: requestUrl.hostname; | ||
return (hostName === null || | ||
this.whitelistedDomains.findIndex(function (domain) { | ||
return typeof domain === "string" | ||
? domain === requestUrl.hostname | ||
? domain === hostName | ||
: domain instanceof RegExp | ||
? domain.test(requestUrl.hostname) | ||
? domain.test(hostName) | ||
: false; | ||
@@ -339,0 +345,0 @@ }) > -1); |
@@ -15,3 +15,3 @@ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs/operators"),require("url"),require("rxjs"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("@auth0/angular-jwt",["exports","@angular/core","rxjs/operators","url","rxjs","@angular/common/http"],t):t(((e=e||self).auth0=e.auth0||{},e.auth0["angular-jwt"]={}),e.ng.core,e.rxjs.operators,e.url,e.rxjs,e.ng.common.http)}(this,(function(e,t,r,o,n,i){"use strict"; | ||
and limitations under the License. | ||
***************************************************************************** */function a(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function s(e,t){return function(r,o){t(r,o,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}var c=new t.InjectionToken("JWT_OPTIONS"),p=function(){function e(e){void 0===e&&(e=null),this.tokenGetter=e&&e.tokenGetter||function(){}}return e.prototype.urlBase64Decode=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("Illegal base64url string!")}return this.b64DecodeUnicode(t)},e.prototype.b64decode=function(e){var t="";if((e=String(e).replace(/=+$/,"")).length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var r=0,o=void 0,n=void 0,i=0;n=e.charAt(i++);~n&&(o=r%4?64*o+n:n,r++%4)?t+=String.fromCharCode(255&o>>(-2*r&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return t},e.prototype.b64DecodeUnicode=function(e){return decodeURIComponent(Array.prototype.map.call(this.b64decode(e),(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))},e.prototype.decodeToken=function(e){if(void 0===e&&(e=this.tokenGetter()),!e||""===e)return null;var t=e.split(".");if(3!==t.length)throw new Error("The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.");var r=this.urlBase64Decode(t[1]);if(!r)throw new Error("Cannot decode the token.");return JSON.parse(r)},e.prototype.getTokenExpirationDate=function(e){var t;if(void 0===e&&(e=this.tokenGetter()),!(t=this.decodeToken(e))||!t.hasOwnProperty("exp"))return null;var r=new Date(0);return r.setUTCSeconds(t.exp),r},e.prototype.isTokenExpired=function(e,t){if(void 0===e&&(e=this.tokenGetter()),!e||""===e)return!0;var r=this.getTokenExpirationDate(e);return t=t||0,null!==r&&!(r.valueOf()>(new Date).valueOf()+1e3*t)},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[c]}]}]},e=a([t.Injectable(),s(0,t.Inject(c)),u("design:paramtypes",[Object])],e)}(),d=function(){function e(e,t){this.jwtHelper=t,this.tokenGetter=e.tokenGetter,this.headerName=e.headerName||"Authorization",this.authScheme=e.authScheme||""===e.authScheme?e.authScheme:"Bearer ",this.whitelistedDomains=e.whitelistedDomains||[],this.blacklistedRoutes=e.blacklistedRoutes||[],this.throwNoTokenError=e.throwNoTokenError||!1,this.skipWhenExpired=e.skipWhenExpired}return e.prototype.isWhitelistedDomain=function(e){var t=o.parse(e.url,!1,!0);return null===t.hostname||this.whitelistedDomains.findIndex((function(e){return"string"==typeof e?e===t.hostname:e instanceof RegExp&&e.test(t.hostname)}))>-1},e.prototype.isBlacklistedRoute=function(e){var t=o.parse(e.url,!1,!0);return this.blacklistedRoutes.findIndex((function(r){if("string"==typeof r){var n=o.parse(r,!1,!0);return n.hostname===t.hostname&&n.path===t.path}return r instanceof RegExp&&r.test(e.url)}))>-1},e.prototype.handleInterception=function(e,t,r){var o,n=!1;if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");return this.skipWhenExpired&&(n=!e||this.jwtHelper.isTokenExpired(e)),e&&n&&this.skipWhenExpired?t=t.clone():e&&(t=t.clone({setHeaders:(o={},o[this.headerName]=""+this.authScheme+e,o)})),r.handle(t)},e.prototype.intercept=function(e,t){var o=this;if(!this.isWhitelistedDomain(e)||this.isBlacklistedRoute(e))return t.handle(e);var i=this.tokenGetter(e);return i instanceof Promise?n.from(i).pipe(r.mergeMap((function(r){return o.handleInterception(r,e,t)}))):this.handleInterception(i,e,t)},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[c]}]},{type:p}]},e=a([t.Injectable(),s(0,t.Inject(c)),u("design:paramtypes",[Object,p])],e)}(),l=function(){function e(e){if(e)throw new Error("JwtModule is already loaded. It should only be imported in your application's main module.")}var r;return r=e,e.forRoot=function(e){return{ngModule:r,providers:[{provide:i.HTTP_INTERCEPTORS,useClass:d,multi:!0},e.jwtOptionsProvider||{provide:c,useValue:e.config},p]}},e.ctorParameters=function(){return[{type:e,decorators:[{type:t.Optional},{type:t.SkipSelf}]}]},e=r=a([t.NgModule(),s(0,t.Optional()),s(0,t.SkipSelf()),u("design:paramtypes",[e])],e)}();e.JWT_OPTIONS=c,e.JwtHelperService=p,e.JwtInterceptor=d,e.JwtModule=l,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
***************************************************************************** */function a(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function s(e,t){return function(r,o){t(r,o,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}var c=new t.InjectionToken("JWT_OPTIONS"),p=function(){function e(e){void 0===e&&(e=null),this.tokenGetter=e&&e.tokenGetter||function(){}}return e.prototype.urlBase64Decode=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("Illegal base64url string!")}return this.b64DecodeUnicode(t)},e.prototype.b64decode=function(e){var t="";if((e=String(e).replace(/=+$/,"")).length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var r=0,o=void 0,n=void 0,i=0;n=e.charAt(i++);~n&&(o=r%4?64*o+n:n,r++%4)?t+=String.fromCharCode(255&o>>(-2*r&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return t},e.prototype.b64DecodeUnicode=function(e){return decodeURIComponent(Array.prototype.map.call(this.b64decode(e),(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))},e.prototype.decodeToken=function(e){if(void 0===e&&(e=this.tokenGetter()),!e||""===e)return null;var t=e.split(".");if(3!==t.length)throw new Error("The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.");var r=this.urlBase64Decode(t[1]);if(!r)throw new Error("Cannot decode the token.");return JSON.parse(r)},e.prototype.getTokenExpirationDate=function(e){var t;if(void 0===e&&(e=this.tokenGetter()),!(t=this.decodeToken(e))||!t.hasOwnProperty("exp"))return null;var r=new Date(0);return r.setUTCSeconds(t.exp),r},e.prototype.isTokenExpired=function(e,t){if(void 0===e&&(e=this.tokenGetter()),!e||""===e)return!0;var r=this.getTokenExpirationDate(e);return t=t||0,null!==r&&!(r.valueOf()>(new Date).valueOf()+1e3*t)},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[c]}]}]},e=a([t.Injectable(),s(0,t.Inject(c)),u("design:paramtypes",[Object])],e)}(),d=function(){function e(e,t){this.jwtHelper=t,this.standardPorts=["80","443"],this.tokenGetter=e.tokenGetter,this.headerName=e.headerName||"Authorization",this.authScheme=e.authScheme||""===e.authScheme?e.authScheme:"Bearer ",this.whitelistedDomains=e.whitelistedDomains||[],this.blacklistedRoutes=e.blacklistedRoutes||[],this.throwNoTokenError=e.throwNoTokenError||!1,this.skipWhenExpired=e.skipWhenExpired}return e.prototype.isWhitelistedDomain=function(e){var t=o.parse(e.url,!1,!0),r=null!==t.hostname?t.hostname+(t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""):t.hostname;return null===r||this.whitelistedDomains.findIndex((function(e){return"string"==typeof e?e===r:e instanceof RegExp&&e.test(r)}))>-1},e.prototype.isBlacklistedRoute=function(e){var t=o.parse(e.url,!1,!0);return this.blacklistedRoutes.findIndex((function(r){if("string"==typeof r){var n=o.parse(r,!1,!0);return n.hostname===t.hostname&&n.path===t.path}return r instanceof RegExp&&r.test(e.url)}))>-1},e.prototype.handleInterception=function(e,t,r){var o,n=!1;if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");return this.skipWhenExpired&&(n=!e||this.jwtHelper.isTokenExpired(e)),e&&n&&this.skipWhenExpired?t=t.clone():e&&(t=t.clone({setHeaders:(o={},o[this.headerName]=""+this.authScheme+e,o)})),r.handle(t)},e.prototype.intercept=function(e,t){var o=this;if(!this.isWhitelistedDomain(e)||this.isBlacklistedRoute(e))return t.handle(e);var i=this.tokenGetter(e);return i instanceof Promise?n.from(i).pipe(r.mergeMap((function(r){return o.handleInterception(r,e,t)}))):this.handleInterception(i,e,t)},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[c]}]},{type:p}]},e=a([t.Injectable(),s(0,t.Inject(c)),u("design:paramtypes",[Object,p])],e)}(),l=function(){function e(e){if(e)throw new Error("JwtModule is already loaded. It should only be imported in your application's main module.")}var r;return r=e,e.forRoot=function(e){return{ngModule:r,providers:[{provide:i.HTTP_INTERCEPTORS,useClass:d,multi:!0},e.jwtOptionsProvider||{provide:c,useValue:e.config},p]}},e.ctorParameters=function(){return[{type:e,decorators:[{type:t.Optional},{type:t.SkipSelf}]}]},e=r=a([t.NgModule(),s(0,t.Optional()),s(0,t.SkipSelf()),u("design:paramtypes",[e])],e)}();e.JWT_OPTIONS=c,e.JwtHelperService=p,e.JwtInterceptor=d,e.JwtModule=l,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=auth0-angular-jwt.umd.min.js.map |
# Change log | ||
## Version [4.1.0](https://github.com/auth0/angular2-jwt/tags/v4.1.2) (2020-05-16) | ||
[Full Changelog](https://github.com/auth0/angular2-jwt/compare/v4.1.1..v4.1.2) | ||
- Support domains with a port other than the default HTTP ports (HTTP: 80, HTTPS: 443) | ||
[#656](https://github.com/auth0/angular2-jwt/pull/656) | ||
## Version [4.1.1](https://github.com/auth0/angular2-jwt/tags/v4.1.1) (2020-05-15) | ||
[Full Changelog](https://github.com/auth0/angular2-jwt/compare/v4.1.0..v4.1.1) | ||
- Something went wrong pulishing `v4.1.0`, this version fixes that. | ||
## Version [4.1.0](https://github.com/auth0/angular2-jwt/tags/v4.1.0) (2020-05-15) | ||
[Full Changelog](https://github.com/auth0/angular2-jwt/compare/4.0.0..4.1.0) | ||
[Full Changelog](https://github.com/auth0/angular2-jwt/compare/4.0.0..v4.1.0) | ||
@@ -7,0 +20,0 @@ - Use blacklist domains regardless of their protocol [#644](https://github.com/auth0/angular2-jwt/pull/644) |
@@ -11,2 +11,3 @@ import { __decorate, __metadata, __param } from "tslib"; | ||
this.jwtHelper = jwtHelper; | ||
this.standardPorts = ["80", "443"]; | ||
this.tokenGetter = config.tokenGetter; | ||
@@ -25,7 +26,12 @@ this.headerName = config.headerName || "Authorization"; | ||
const requestUrl = parse(request.url, false, true); | ||
return (requestUrl.hostname === null || | ||
const hostName = requestUrl.hostname !== null | ||
? `${requestUrl.hostname}${requestUrl.port && !this.standardPorts.includes(requestUrl.port) | ||
? ":" + requestUrl.port | ||
: ""}` | ||
: requestUrl.hostname; | ||
return (hostName === null || | ||
this.whitelistedDomains.findIndex((domain) => typeof domain === "string" | ||
? domain === requestUrl.hostname | ||
? domain === hostName | ||
: domain instanceof RegExp | ||
? domain.test(requestUrl.hostname) | ||
? domain.test(hostName) | ||
: false) > -1); | ||
@@ -93,2 +99,2 @@ } | ||
export { JwtInterceptor }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiand0LmludGVyY2VwdG9yLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGF1dGgwL2FuZ3VsYXItand0LyIsInNvdXJjZXMiOlsibGliL2p3dC5pbnRlcmNlcHRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFPbkQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDdkQsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUF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IH0pO1xuICAgIH1cbiAgICByZXR1cm4gbmV4dC5oYW5kbGUocmVxdWVzdCk7XG4gIH1cblxuICBpbnRlcmNlcHQoXG4gICAgcmVxdWVzdDogSHR0cFJlcXVlc3Q8YW55PixcbiAgICBuZXh0OiBIdHRwSGFuZGxlclxuICApOiBPYnNlcnZhYmxlPEh0dHBFdmVudDxhbnk+PiB7XG4gICAgaWYgKFxuICAgICAgIXRoaXMuaXNXaGl0ZWxpc3RlZERvbWFpbihyZXF1ZXN0KSB8fFxuICAgICAgdGhpcy5pc0JsYWNrbGlzdGVkUm91dGUocmVxdWVzdClcbiAgICApIHtcbiAgICAgIHJldHVybiBuZXh0LmhhbmRsZShyZXF1ZXN0KTtcbiAgICB9XG4gICAgY29uc3QgdG9rZW4gPSB0aGlzLnRva2VuR2V0dGVyKHJlcXVlc3QpO1xuXG4gICAgaWYgKHRva2VuIGluc3RhbmNlb2YgUHJvbWlzZSkge1xuICAgICAgcmV0dXJuIGZyb20odG9rZW4pLnBpcGUoXG4gICAgICAgIG1lcmdlTWFwKChhc3luY1Rva2VuOiBzdHJpbmcgfCBudWxsKSA9PiB7XG4gICAgICAgICAgcmV0dXJuIHRoaXMuaGFuZGxlSW50ZXJjZXB0aW9uKGFzeW5jVG9rZW4sIHJlcXVlc3QsIG5leHQpO1xuICAgICAgICB9KVxuICAgICAgKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIHRoaXMuaGFuZGxlSW50ZXJjZXB0aW9uKHRva2VuLCByZXF1ZXN0LCBuZXh0KTtcbiAgICB9XG4gIH1cbn1cbiJdfQ== |
@@ -11,2 +11,3 @@ import { __decorate, __metadata, __param } from "tslib"; | ||
this.jwtHelper = jwtHelper; | ||
this.standardPorts = ["80", "443"]; | ||
this.tokenGetter = config.tokenGetter; | ||
@@ -25,8 +26,13 @@ this.headerName = config.headerName || "Authorization"; | ||
var requestUrl = parse(request.url, false, true); | ||
return (requestUrl.hostname === null || | ||
var hostName = requestUrl.hostname !== null | ||
? "" + requestUrl.hostname + (requestUrl.port && !this.standardPorts.includes(requestUrl.port) | ||
? ":" + requestUrl.port | ||
: "") | ||
: requestUrl.hostname; | ||
return (hostName === null || | ||
this.whitelistedDomains.findIndex(function (domain) { | ||
return typeof domain === "string" | ||
? domain === requestUrl.hostname | ||
? domain === hostName | ||
: domain instanceof RegExp | ||
? domain.test(requestUrl.hostname) | ||
? domain.test(hostName) | ||
: false; | ||
@@ -98,2 +104,2 @@ }) > -1); | ||
export { JwtInterceptor }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiand0LmludGVyY2VwdG9yLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGF1dGgwL2FuZ3VsYXItand0LyIsInNvdXJjZXMiOlsibGliL2p3dC5pbnRlcmNlcHRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFPbkQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDdkQsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBRWpELE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUMxQyxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sS0FBSyxDQUFDO0FBQzVCLE9BQU8sRUFBRSxJQUFJLEVBQWMsTUFBTSxNQUFNLENBQUM7QUFHeEM7SUFXRSx3QkFDdUIsTUFBVyxFQUN6QixTQUEyQjtRQUEzQixjQUFTLEdBQVQsU0FBUyxDQUFrQjtRQUVsQyxJQUFJLENBQUMsV0FBVyxHQUFHLE1BQU0sQ0FBQyxXQUFXLENBQUM7UUFDdEMsSUFBSSxDQUFDLFVBQVUsR0FBRyxNQUFNLENBQUMsVUFBVSxJQUFJLGVBQWUsQ0FBQztR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ICAgY29uc3QgdG9rZW4gPSB0aGlzLnRva2VuR2V0dGVyKHJlcXVlc3QpO1xuXG4gICAgaWYgKHRva2VuIGluc3RhbmNlb2YgUHJvbWlzZSkge1xuICAgICAgcmV0dXJuIGZyb20odG9rZW4pLnBpcGUoXG4gICAgICAgIG1lcmdlTWFwKChhc3luY1Rva2VuOiBzdHJpbmcgfCBudWxsKSA9PiB7XG4gICAgICAgICAgcmV0dXJuIHRoaXMuaGFuZGxlSW50ZXJjZXB0aW9uKGFzeW5jVG9rZW4sIHJlcXVlc3QsIG5leHQpO1xuICAgICAgICB9KVxuICAgICAgKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIHRoaXMuaGFuZGxlSW50ZXJjZXB0aW9uKHRva2VuLCByZXF1ZXN0LCBuZXh0KTtcbiAgICB9XG4gIH1cbn1cbiJdfQ== |
@@ -116,2 +116,3 @@ import { __decorate, __param, __metadata } from 'tslib'; | ||
this.jwtHelper = jwtHelper; | ||
this.standardPorts = ["80", "443"]; | ||
this.tokenGetter = config.tokenGetter; | ||
@@ -130,7 +131,12 @@ this.headerName = config.headerName || "Authorization"; | ||
const requestUrl = parse(request.url, false, true); | ||
return (requestUrl.hostname === null || | ||
const hostName = requestUrl.hostname !== null | ||
? `${requestUrl.hostname}${requestUrl.port && !this.standardPorts.includes(requestUrl.port) | ||
? ":" + requestUrl.port | ||
: ""}` | ||
: requestUrl.hostname; | ||
return (hostName === null || | ||
this.whitelistedDomains.findIndex((domain) => typeof domain === "string" | ||
? domain === requestUrl.hostname | ||
? domain === hostName | ||
: domain instanceof RegExp | ||
? domain.test(requestUrl.hostname) | ||
? domain.test(hostName) | ||
: false) > -1); | ||
@@ -137,0 +143,0 @@ } |
@@ -121,2 +121,3 @@ import { __decorate, __param, __metadata } from 'tslib'; | ||
this.jwtHelper = jwtHelper; | ||
this.standardPorts = ["80", "443"]; | ||
this.tokenGetter = config.tokenGetter; | ||
@@ -135,8 +136,13 @@ this.headerName = config.headerName || "Authorization"; | ||
var requestUrl = parse(request.url, false, true); | ||
return (requestUrl.hostname === null || | ||
var hostName = requestUrl.hostname !== null | ||
? "" + requestUrl.hostname + (requestUrl.port && !this.standardPorts.includes(requestUrl.port) | ||
? ":" + requestUrl.port | ||
: "") | ||
: requestUrl.hostname; | ||
return (hostName === null || | ||
this.whitelistedDomains.findIndex(function (domain) { | ||
return typeof domain === "string" | ||
? domain === requestUrl.hostname | ||
? domain === hostName | ||
: domain instanceof RegExp | ||
? domain.test(requestUrl.hostname) | ||
? domain.test(hostName) | ||
: false; | ||
@@ -143,0 +149,0 @@ }) > -1); |
@@ -13,2 +13,3 @@ import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from "@angular/common/http"; | ||
skipWhenExpired: boolean; | ||
standardPorts: string[]; | ||
constructor(config: any, jwtHelper: JwtHelperService); | ||
@@ -15,0 +16,0 @@ isWhitelistedDomain(request: HttpRequest<any>): boolean; |
{ | ||
"name": "@auth0/angular-jwt", | ||
"version": "4.1.1", | ||
"version": "4.1.2", | ||
"description": "JSON Web Token helper library for Angular", | ||
@@ -5,0 +5,0 @@ "private": false, |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
244002
1534
0