Comparing version 5.3.0 to 5.4.0
@@ -30,3 +30,3 @@ import { HttpRequest, HttpErrorResponse } from '@angular/common/http'; | ||
*/ | ||
abstract refreshShouldHappen(response: HttpErrorResponse): boolean; | ||
abstract refreshShouldHappen(response: HttpErrorResponse, request?: HttpRequest<any>): boolean; | ||
/** | ||
@@ -33,0 +33,0 @@ * Verify that outgoing request is refresh-token, |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('rxjs/operators'), require('@angular/common/http'), require('rxjs')) : | ||
typeof define === 'function' && define.amd ? define('ngx-auth', ['exports', '@angular/core', '@angular/router', 'rxjs/operators', '@angular/common/http', 'rxjs'], factory) : | ||
(factory((global['ngx-auth'] = {}),global.ng.core,global.ng.router,global.rxjs.operators,global.ng.common.http,global.rxjs)); | ||
}(this, (function (exports,core,router,operators,http,rxjs) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('rxjs/operators'), require('@angular/common/http'), require('rxjs')) : | ||
typeof define === 'function' && define.amd ? define('ngx-auth', ['exports', '@angular/core', '@angular/common', '@angular/router', 'rxjs/operators', '@angular/common/http', 'rxjs'], factory) : | ||
(factory((global['ngx-auth'] = {}),global.ng.core,global.ng.common,global.ng.router,global.rxjs.operators,global.ng.common.http,global.rxjs)); | ||
}(this, (function (exports,core,common,router,operators,http,rxjs) { 'use strict'; | ||
@@ -46,7 +46,9 @@ /** | ||
* @export | ||
* \@dynamic | ||
*/ | ||
var PublicGuard = /** @class */ (function () { | ||
function PublicGuard(authService, protectedFallbackPageUri, router$$1) { | ||
function PublicGuard(authService, protectedFallbackPageUri, document, router$$1) { | ||
this.authService = authService; | ||
this.protectedFallbackPageUri = protectedFallbackPageUri; | ||
this.document = document; | ||
this.router = router$$1; | ||
@@ -129,3 +131,3 @@ } | ||
if (url.startsWith('http')) { | ||
window.location.href = url; | ||
this.document.location.href = url; | ||
} | ||
@@ -144,2 +146,3 @@ else { | ||
{ type: String, decorators: [{ type: core.Inject, args: [PROTECTED_FALLBACK_PAGE_URI,] }] }, | ||
{ type: Document, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }, | ||
{ type: router.Router } | ||
@@ -162,7 +165,9 @@ ]; | ||
* @export | ||
* \@dynamic | ||
*/ | ||
var ProtectedGuard = /** @class */ (function () { | ||
function ProtectedGuard(authService, publicFallbackPageUri, router$$1) { | ||
function ProtectedGuard(authService, publicFallbackPageUri, document, router$$1) { | ||
this.authService = authService; | ||
this.publicFallbackPageUri = publicFallbackPageUri; | ||
this.document = document; | ||
this.router = router$$1; | ||
@@ -248,3 +253,3 @@ } | ||
if (url.startsWith('http')) { | ||
window.location.href = url; | ||
this.document.location.href = url; | ||
} | ||
@@ -263,2 +268,3 @@ else { | ||
{ type: String, decorators: [{ type: core.Inject, args: [PUBLIC_FALLBACK_PAGE_URI,] }] }, | ||
{ type: Document, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }, | ||
{ type: router.Router } | ||
@@ -271,14 +277,14 @@ ]; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Copyright (c) Microsoft Corporation. | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */ | ||
@@ -416,3 +422,3 @@ function __read(o, n) { | ||
/** @type {?} */ | ||
var refreshShouldHappen = authService.refreshShouldHappen(res); | ||
var refreshShouldHappen = authService.refreshShouldHappen(res, req); | ||
if (refreshShouldHappen && !this.refreshInProgress) { | ||
@@ -625,2 +631,2 @@ this.refreshInProgress = true; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWF1dGgudW1kLmpzLm1hcCIsInNvdXJjZXMiOlsibmc6Ly9uZ3gtYXV0aC9hdXRoLnNlcnZpY2UudHMiLCJuZzovL25neC1hdXRoL3Rva2Vucy50cyIsIm5nOi8vbmd4LWF1dGgvcHVibGljLmd1YXJkLnRzIiwibmc6Ly9uZ3gtYXV0aC9wcm90ZWN0ZWQuZ3VhcmQudHMiLCJub2RlX21vZHVsZXMvdHNsaWIvdHNsaWIuZXM2LmpzIiwibmc6Ly9uZ3gtYXV0aC9hdXRoLmludGVyY2VwdG9yLnRzIiwibmc6Ly9uZ3gtYXV0aC9hdXRoLm1vZHVsZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBIdHRwUmVxdWVzdCwgSHR0cEVycm9yUmVzcG9uc2UgfSBmcm9tICdAYW5ndWxhci9jb21tb24vaHR0cCc7XG5pbXBvcnQ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Kykge1xyXG4gICAgICAgICAgICBzID0gYXJndW1lbnRzW2ldO1xyXG4gICAgICAgICAgICBmb3IgKHZhciBwIGluIHMpIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocywgcCkpIHRbcF0gPSBzW3BdO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gdDtcclxuICAgIH1cclxuICAgIHJldHVybiBfX2Fzc2lnbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gX19yZXN0KHMsIGUpIHtcclxuICAgIHZhciB0ID0ge307XHJcbiAgICBmb3IgKHZhciBwIGluIHMpIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocywgcCkgJiYgZS5pbmRleE9mKHApIDwgMClcclxuICAgICAgICB0W3BdID0gc1twXTtcclxuICAgIGlmIChzICE9IG51bGwgJiYgdHlwZW9mIE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMgPT09IFwiZnVuY3Rpb25cIilcclxuICAgICAgICBmb3IgKHZhciBpID0gMCwgcCA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMocyk7IGkgPCBwLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChlLmluZGV4T2YocFtpXSkgPCAwICYmIE9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChzLCBwW2ldKSlcclxuICAgICAgICAgICAgICAgIHRbcFtpXV0gPSBzW3BbaV1dO1xyXG4gICAgICAgIH1cclxuICAgIHJldHVybiB0O1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gX19kZWNvcmF0ZShkZWNvcmF0b3JzLCB0YXJnZXQsIGtleSwgZGVzYykge1xyXG4gICAgdmFyIGMgPSBhcmd1bWVudHMubGVuZ3RoLCByID0gYyA8IDMgPyB0YXJnZXQgOiBkZXNjID09PS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ys7IHkgPSBvcFsxXTsgb3AgPSBbMF07IGNvbnRpbnVlO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA3OiBvcCA9IF8ub3BzLnBvcCgpOyBfLnRyeXMucG9wKCk7IGNvbnRpbnVlO1xyXG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcclxuICAgICAgICAgICAgICAgICAgICBpZiAoISh0ID0gXy50cnlzLCB0ID0gdC5sZW5ndGggPiAwICYmIHRbdC5sZW5ndGggLSAxXSkgJiYgKG9wWzBdID09PSA2IHx8IG9wWzBdID09PSAyKSkgeyBfID0gMDsgY29udGludWU7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDMgJiYgKCF0IHx8IChvcFsxXSA+IHRbMF0gJiYgb3BbMV0gPCB0WzNdKSkpIHsgXy5sYWJlbCA9IG9wWzFdOyBicmVhazsgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChvcFswXSA9PT0gNiAmJiBfLmxhYmVsIDwgdFsxXSkgeyBfLmxhYmVsID0gdFsxXTsgdCA9IG9wOyBicmVhazsgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmICh0ICYmIF8ubGFiZWwgPCB0WzJdKSB7IF8ubGFiZWwgPSB0WzJdOyBfLm9wcy5wdXNoKG9wKTsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAodFsyXSkgXy5vcHMucG9wKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBvcCA9IGJvZHkuY2FsbCh0aGlzQXJnLCBfKTtcclxuICAgICAgICB9IGNhdGNoIChlKSB7IG9wID0gWzYsIGVdOyB5ID0gMDsgfSBmaW5hbGx5IHsgZiA9IHQgPSAwOyB9XHJcbiAgICAgICAgaWYgKG9wWzBdICYgNSkgdGhyb3cgb3BbMV07IHJldHVybiB7IHZhbHVlOiBvcFswXSA/IG9wWzFd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xJQUFJLGtCQUFrQixJQUFJLGtCQUFrQixDQUFDO2FBQ2hFOzs7Ozs7Ozs7Ozs7UUFNTyw4QkFBSTs7Ozs7OztZQUFaLFVBQWEsTUFBYztnQkFBRSxjQUFjO3FCQUFkLFVBQWMsRUFBZCxxQkFBYyxFQUFkLElBQWM7b0JBQWQsNkJBQWM7OztvQkFDbkMsV0FBVyxHQUNmLElBQUksQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFjLFlBQVksQ0FBQztnQkFFOUMsSUFBSSxPQUFPLFdBQVcsQ0FBQyxNQUFNLENBQUMsS0FBSyxVQUFVLEVBQUU7b0JBQzdDLE9BQU8sV0FBVyxDQUFDLE1BQU0sQ0FBQyxPQUFuQixXQUFXLFdBQVksSUFBSSxHQUFFO2lCQUNyQzthQUNGOztvQkFqTEZQLGVBQVU7Ozs7O3dCQWZVVyxhQUFROzs7UUFrTTdCLHNCQUFDO0tBbkxEOzs7Ozs7QUNmQTtRQU9BO1NBYUM7O29CQWJBQyxhQUFRLFNBQUM7d0JBQ1IsU0FBUyxFQUFFOzRCQUNULFdBQVc7NEJBQ1gsY0FBYzs0QkFDZCxlQUFlOzRCQUNmO2dDQUNFLE9BQU8sRUFBRUMsc0JBQWlCO2dDQUMxQixRQUFRLEVBQUUsZUFBZTtnQ0FDekIsS0FBSyxFQUFFLElBQUk7NkJBQ1o7eUJBQ0Y7cUJBQ0Y7O1FBRUQsaUJBQUM7S0FiRDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0= |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/router"),require("rxjs/operators"),require("@angular/common/http"),require("rxjs")):"function"==typeof define&&define.amd?define("ngx-auth",["exports","@angular/core","@angular/router","rxjs/operators","@angular/common/http","rxjs"],t):t(e["ngx-auth"]={},e.ng.core,e.ng.router,e.rxjs.operators,e.ng.common.http,e.rxjs)}(this,function(e,t,r,o,i,u){"use strict";var n=function y(){},s=new t.InjectionToken("AUTH_SERVICE"),c=new t.InjectionToken("PUBLIC_FALLBACK_PAGE_URI"),a=new t.InjectionToken("PROTECTED_FALLBACK_PAGE_URI"),p=function(){function e(e,t,r){this.authService=e,this.protectedFallbackPageUri=t,this.router=r}return e.prototype.canActivate=function(e,t){var r=this;return this.authService.isAuthorized().pipe(o.map(function(e){return!(e&&!r.isProtectedPage(t))||(r.navigate(r.protectedFallbackPageUri),!1)}))},e.prototype.canActivateChild=function(e,t){return this.canActivate(e,t)},e.prototype.isProtectedPage=function(e){return e.url===this.protectedFallbackPageUri},e.prototype.navigate=function(e){e.startsWith("http")?window.location.href=e:this.router.navigateByUrl(e)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:n,decorators:[{type:t.Inject,args:[s]}]},{type:String,decorators:[{type:t.Inject,args:[a]}]},{type:r.Router}]},e}(),h=function(){function e(e,t,r){this.authService=e,this.publicFallbackPageUri=t,this.router=r}return e.prototype.canActivate=function(e,t){var r=this;return this.authService.isAuthorized().pipe(o.map(function(e){return!(!e&&!r.isPublicPage(t))||(r.authService.setInterruptedUrl&&r.authService.setInterruptedUrl(t.url),r.navigate(r.publicFallbackPageUri),!1)}))},e.prototype.canActivateChild=function(e,t){return this.canActivate(e,t)},e.prototype.isPublicPage=function(e){return e.url===this.publicFallbackPageUri},e.prototype.navigate=function(e){e.startsWith("http")?window.location.href=e:this.router.navigateByUrl(e)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:n,decorators:[{type:t.Inject,args:[s]}]},{type:String,decorators:[{type:t.Inject,args:[c]}]},{type:r.Router}]},e}();function f(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(o)throw o.error}}return u}var l=function(){function e(e){this.injector=e,this.refreshInProgress=!1,this.refreshSubject=new u.Subject}return e.prototype.intercept=function(e,t){return this.skipRequest(e)?t.handle(e):this.processIntercept(e,t)},e.prototype.processIntercept=function(e,t){var r=this,n=e.clone();return this.request(n).pipe(o.switchMap(function(e){return t.handle(e)}),o.catchError(function(e){return r.responseError(n,e)}))},e.prototype.request=function(e){return this.refreshInProgress?this.delayRequest(e):this.addToken(e)},e.prototype.responseError=function(e,t){var r=this,n=this.injector.get(s),o=n.refreshShouldHappen(t);return o&&!this.refreshInProgress&&(this.refreshInProgress=!0,n.refreshToken().subscribe(function(){r.refreshInProgress=!1,r.refreshSubject.next(!0)},function(){r.refreshInProgress=!1,r.refreshSubject.next(!1)})),o&&this.refreshInProgress?this.retryRequest(e,t):u.throwError(t)},e.prototype.addToken=function(r){var n=this.injector.get(s);return n.getAccessToken().pipe(o.map(function(e){if(e){var t=void 0;return t="function"==typeof n.getHeaders?n.getHeaders(e):{Authorization:"Bearer "+e},r.clone({setHeaders:t})}return r}),o.first())},e.prototype.delayRequest=function(t){var r=this;return this.refreshSubject.pipe(o.first(),o.switchMap(function(e){return e?r.addToken(t):u.throwError(t)}))},e.prototype.retryRequest=function(t,r){var n=this.injector.get(i.HttpClient);return this.refreshSubject.pipe(o.first(),o.switchMap(function(e){return e?n.request(t):u.throwError(r||t)}))},e.prototype.skipRequest=function(e){var t=this.exec("skipRequest",e),r=this.exec("verifyRefreshToken",e),n=this.exec("verifyTokenRequest",e.url);return t||r||n},e.prototype.exec=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=this.injector.get(s);if("function"==typeof n[e])return n[e].apply(n,function o(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e}(t))},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:t.Injector}]},e}(),d=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{providers:[p,h,l,{provide:i.HTTP_INTERCEPTORS,useClass:l,multi:!0}]}]}],e}();e.AuthService=n,e.PublicGuard=p,e.ProtectedGuard=h,e.AUTH_SERVICE=s,e.PUBLIC_FALLBACK_PAGE_URI=c,e.PROTECTED_FALLBACK_PAGE_URI=a,e.AuthModule=d,e.ɵa=l,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/router"),require("rxjs/operators"),require("@angular/common/http"),require("rxjs")):"function"==typeof define&&define.amd?define("ngx-auth",["exports","@angular/core","@angular/common","@angular/router","rxjs/operators","@angular/common/http","rxjs"],t):t(e["ngx-auth"]={},e.ng.core,e.ng.common,e.ng.router,e.rxjs.operators,e.ng.common.http,e.rxjs)}(this,function(e,t,r,n,o,i,s){"use strict";var c=function(){},u=new t.InjectionToken("AUTH_SERVICE"),a=new t.InjectionToken("PUBLIC_FALLBACK_PAGE_URI"),p=new t.InjectionToken("PROTECTED_FALLBACK_PAGE_URI"),h=(f.prototype.canActivate=function(e,t){var r=this;return this.authService.isAuthorized().pipe(o.map(function(e){return!(e&&!r.isProtectedPage(t))||(r.navigate(r.protectedFallbackPageUri),!1)}))},f.prototype.canActivateChild=function(e,t){return this.canActivate(e,t)},f.prototype.isProtectedPage=function(e){return e.url===this.protectedFallbackPageUri},f.prototype.navigate=function(e){e.startsWith("http")?this.document.location.href=e:this.router.navigateByUrl(e)},f.decorators=[{type:t.Injectable}],f.ctorParameters=function(){return[{type:c,decorators:[{type:t.Inject,args:[u]}]},{type:String,decorators:[{type:t.Inject,args:[p]}]},{type:Document,decorators:[{type:t.Inject,args:[r.DOCUMENT]}]},{type:n.Router}]},f);function f(e,t,r,n){this.authService=e,this.protectedFallbackPageUri=t,this.document=r,this.router=n}var l=(d.prototype.canActivate=function(e,t){var r=this;return this.authService.isAuthorized().pipe(o.map(function(e){return!(!e&&!r.isPublicPage(t))||(r.authService.setInterruptedUrl&&r.authService.setInterruptedUrl(t.url),r.navigate(r.publicFallbackPageUri),!1)}))},d.prototype.canActivateChild=function(e,t){return this.canActivate(e,t)},d.prototype.isPublicPage=function(e){return e.url===this.publicFallbackPageUri},d.prototype.navigate=function(e){e.startsWith("http")?this.document.location.href=e:this.router.navigateByUrl(e)},d.decorators=[{type:t.Injectable}],d.ctorParameters=function(){return[{type:c,decorators:[{type:t.Inject,args:[u]}]},{type:String,decorators:[{type:t.Inject,args:[a]}]},{type:Document,decorators:[{type:t.Inject,args:[r.DOCUMENT]}]},{type:n.Router}]},d);function d(e,t,r,n){this.authService=e,this.publicFallbackPageUri=t,this.document=r,this.router=n}function y(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)s.push(n.value)}catch(c){o={error:c}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(o)throw o.error}}return s}var g=(v.prototype.intercept=function(e,t){return this.skipRequest(e)?t.handle(e):this.processIntercept(e,t)},v.prototype.processIntercept=function(e,t){var r=this,n=e.clone();return this.request(n).pipe(o.switchMap(function(e){return t.handle(e)}),o.catchError(function(e){return r.responseError(n,e)}))},v.prototype.request=function(e){return this.refreshInProgress?this.delayRequest(e):this.addToken(e)},v.prototype.responseError=function(e,t){var r=this,n=this.injector.get(u),o=n.refreshShouldHappen(t,e);return o&&!this.refreshInProgress&&(this.refreshInProgress=!0,n.refreshToken().subscribe(function(){r.refreshInProgress=!1,r.refreshSubject.next(!0)},function(){r.refreshInProgress=!1,r.refreshSubject.next(!1)})),o&&this.refreshInProgress?this.retryRequest(e,t):s.throwError(t)},v.prototype.addToken=function(r){var n=this.injector.get(u);return n.getAccessToken().pipe(o.map(function(e){if(e){var t=void 0,t="function"==typeof n.getHeaders?n.getHeaders(e):{Authorization:"Bearer "+e};return r.clone({setHeaders:t})}return r}),o.first())},v.prototype.delayRequest=function(t){var r=this;return this.refreshSubject.pipe(o.first(),o.switchMap(function(e){return e?r.addToken(t):s.throwError(t)}))},v.prototype.retryRequest=function(t,r){var n=this.injector.get(i.HttpClient);return this.refreshSubject.pipe(o.first(),o.switchMap(function(e){return e?n.request(t):s.throwError(r||t)}))},v.prototype.skipRequest=function(e){var t=this.exec("skipRequest",e),r=this.exec("verifyRefreshToken",e),e=this.exec("verifyTokenRequest",e.url);return t||r||e},v.prototype.exec=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=this.injector.get(u);if("function"==typeof n[e])return n[e].apply(n,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}(t))},v.decorators=[{type:t.Injectable}],v.ctorParameters=function(){return[{type:t.Injector}]},v);function v(e){this.injector=e,this.refreshInProgress=!1,this.refreshSubject=new s.Subject}var P=(I.decorators=[{type:t.NgModule,args:[{providers:[h,l,g,{provide:i.HTTP_INTERCEPTORS,useClass:g,multi:!0}]}]}],I);function I(){}e.AuthService=c,e.PublicGuard=h,e.ProtectedGuard=l,e.AUTH_SERVICE=u,e.PUBLIC_FALLBACK_PAGE_URI=a,e.PROTECTED_FALLBACK_PAGE_URI=p,e.AuthModule=P,e.ɵa=g,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ngx-auth.umd.min.js.map |
@@ -71,3 +71,3 @@ /** | ||
/** @type {?} */ | ||
const refreshShouldHappen = authService.refreshShouldHappen(res); | ||
const refreshShouldHappen = authService.refreshShouldHappen(res, req); | ||
if (refreshShouldHappen && !this.refreshInProgress) { | ||
@@ -186,2 +186,2 @@ this.refreshInProgress = true; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC5pbnRlcmNlcHRvci5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1hdXRoLyIsInNvdXJjZXMiOlsiYXV0aC5pbnRlcmNlcHRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSx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hvZF0oLi4uYXJncyk7XG4gICAgfVxuICB9XG5cbn1cbiJdfQ== |
@@ -42,5 +42,6 @@ /** | ||
* @param {?} response | ||
* @param {?=} request | ||
* @return {?} | ||
*/ | ||
AuthService.prototype.refreshShouldHappen = function (response) { }; | ||
AuthService.prototype.refreshShouldHappen = function (response, request) { }; | ||
/** | ||
@@ -91,2 +92,2 @@ * Verify that outgoing request is refresh-token, | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWF1dGgvIiwic291cmNlcyI6WyJhdXRoLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFNQSxNQUFNLE9BQWdCLFdBQVc7Q0ErRGhDOzs7Ozs7OztJQXpEQyxxREFBb0Q7Ozs7Ozs7O0lBT3BELHVEQUFxRDs7Ozs7Ozs7SUFPckQscURBQWdEOzs7Ozs7Ozs7O0lBUWhELG9FQUEwRTs7Ozs7Ozs7SUFNMUUsa0VBQXdFOzs7Ozs7OztJQU14RSwyREFBaUU7Ozs7Ozs7Ozs7SUFRakUsd0RBQWtGOzs7Ozs7OztJQU1sRiw2REFBc0Q7Ozs7Ozs7Ozs7SUFRdEQsOERBQTBEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSHR0cFJlcXVlc3QsIEh0dHBFcnJvclJlc3BvbnNlIH0gZnJvbSAnQGFuZ3VsYXIvY29tbW9uL2h0dHAnO1xuaW1wb3J0IHsgT2JzZXJ2YWJsZSB9IGZyb20gJ3J4anMnO1xuXG4vKipcbiAqIEVzc2VudGlhbCBzZXJ2aWNlIGZvciBhdXRoZW50aWNhdGlvblxuICovXG5leHBvcnQgYWJzdHJhY3QgY2xhc3MgQXV0aFNlcnZpY2Uge1xuXG4gIC8qKlxuICAgKiBDaGVjaywgaWYgdXNlciBhbHJlYWR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biAgcHVibGljIGFic3RyYWN0IGdldEhlYWRlcnM/KHRva2VuOiBzdHJpbmcpOiB7IFtuYW1lOiBzdHJpbmddOiBzdHJpbmcgfCBzdHJpbmdbXSB9O1xuXG4gIC8qKlxuICAgKiBTYXZlcyBsYXN0IGludGVycnVwdGVkIHVybCBpbnNpZGUgb2YgdGhlIHNlcnZpY2UgZm9yIGZ1cnRoZXIgcmV1c2FnZSxcbiAgICogZS5nLiByZXN0b3JpbmcgaW50ZXJydXB0ZWQgcGFnZSBhZnRlciBsb2dnaW5nIGluXG4gICAqL1xuICBwdWJsaWMgYWJzdHJhY3Qgc2V0SW50ZXJydXB0ZWRVcmw/KHVybDogc3RyaW5nKTogdm9pZDtcblxuICAvKipcbiAgICogVmVyaWZ5IHRoYXQgb3V0Z29pbmcgcmVxdWVzdCBpcyByZWZyZXNoLXRva2VuLFxuICAgKiBzbyBpbnRlcmNlcHRvciB3b24ndCBpbnRlcmNlcHQgdGhpcyByZXF1ZXN0XG4gICAqIEBkZXByZWNhdGVkIER1ZSB0byBpbGxvZ2ljYWwgbWVhbmluZy9mdW5jdGlvbmFsaXR5IHRoaXMgbWV0aG9kIGlzIGRlcHJlY2F0ZWRcbiAgICogQHNlZSB2ZXJpZnlSZWZyZXNoVG9rZW5cbiAgICovXG4gIHB1YmxpYyBhYnN0cmFjdCB2ZXJpZnlUb2tlblJlcXVlc3Q/KHVybDogc3RyaW5nKTogYm9vbGVhbjtcbn1cbiJdfQ== |
@@ -5,2 +5,3 @@ /** | ||
*/ | ||
import { DOCUMENT } from '@angular/common'; | ||
import { Injectable, Inject } from '@angular/core'; | ||
@@ -18,2 +19,3 @@ import { Router } from '@angular/router'; | ||
* @export | ||
* \@dynamic | ||
*/ | ||
@@ -24,7 +26,9 @@ export class ProtectedGuard { | ||
* @param {?} publicFallbackPageUri | ||
* @param {?} document | ||
* @param {?} router | ||
*/ | ||
constructor(authService, publicFallbackPageUri, router) { | ||
constructor(authService, publicFallbackPageUri, document, router) { | ||
this.authService = authService; | ||
this.publicFallbackPageUri = publicFallbackPageUri; | ||
this.document = document; | ||
this.router = router; | ||
@@ -75,3 +79,3 @@ } | ||
if (url.startsWith('http')) { | ||
window.location.href = url; | ||
this.document.location.href = url; | ||
} | ||
@@ -90,2 +94,3 @@ else { | ||
{ type: String, decorators: [{ type: Inject, args: [PUBLIC_FALLBACK_PAGE_URI,] }] }, | ||
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] }, | ||
{ type: Router } | ||
@@ -99,4 +104,6 @@ ]; | ||
/** @type {?} */ | ||
ProtectedGuard.prototype.document; | ||
/** @type {?} */ | ||
ProtectedGuard.prototype.router; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvdGVjdGVkLmd1YXJkLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWF1dGgvIiwic291cmNlcyI6WyJwcm90ZWN0ZWQuZ3VhcmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ25ELE9BQU8sRUFDTCxNQUFNLEVBS1AsTUFBTSxpQkFBaUIsQ0FBQztBQUV6QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFckMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzdDLE9BQU8sRUFBRSxZQUFZLEVBQUUsd0JBQXdCLEVBQUUsTUFBTSxVQUFVLENBQUM7Ozs7Ozs7OztBQVdsRSxNQUFNLE9BQU8sY0FBYzs7Ozs7O0lBRXpCLFlBQytCLFdBQXdCLEVBQ1gscUJBQTZCLEVBQy9ELE1BQWM7UUFGTyxnQkFBVyxHQUFYLFdBQVcsQ0FBYTtRQUNYLDBCQUFxQixHQUFyQixxQkFBcUIsQ0FBUTtRQUMvR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VibGljRmFsbGJhY2tQYWdlVXJpKTtcblxuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfSkpO1xuICB9XG5cbiAgLyoqXG4gICAqIENhbkFjdGl2YXRlQ2hpbGQgaGFuZGxlclxuICAgKi9cbiAgcHVibGljIGNhbkFjdGl2YXRlQ2hpbGQoXG4gICAgcm91dGU6IEFjdGl2YXRlZFJvdXRlU25hcHNob3QsXG4gICAgc3RhdGU6IFJvdXRlclN0YXRlU25hcHNob3RcbiAgKTogT2JzZXJ2YWJsZTxib29sZWFuPiB7XG4gICAgcmV0dXJuIHRoaXMuY2FuQWN0aXZhdGUocm91dGUsIHN0YXRlKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBDaGVjaywgaWYgY3VycmVudCBwYWdlIGlzIHB1YmxpYyBmYWxsYmFjayBwYWdlXG4gICAqL1xuICBwcml2YXRlIGlzUHVibGljUGFnZShzdGF0ZTogUm91dGVyU3RhdGVTbmFwc2hvdCk6IGJvb2xlYW4ge1xuICAgIHJldHVybiBzdGF0ZS51cmwgPT09IHRoaXMucHVibGljRmFsbGJhY2tQYWdlVXJpO1xuICB9XG5cbiAgLyoqXG4gICAqIE5hdmlnYXRlIGF3YXkgZnJvbSB0aGUgYXBwIC8gcGF0aFxuICAgKi9cbiAgcHJpdmF0ZSBuYXZpZ2F0ZSh1cmw6IHN0cmluZyk6IHZvaWQge1xuICAgIGlmICh1cmwuc3RhcnRzV2l0aCgnaHR0cCcpKSB7XG4gICAgICB3aW5kb3cubG9jYXRpb24uaHJlZiA9IHVybDtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhpcy5yb3V0ZXIubmF2aWdhdGVCeVVybCh1cmwpO1xuICAgIH1cbiAgfVxuXG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvdGVjdGVkLmd1YXJkLmpzIiwic291cmNlU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AgLyoqXG4gICAqIENhbkFjdGl2YXRlQ2hpbGQgaGFuZGxlclxuICAgKi9cbiAgcHVibGljIGNhbkFjdGl2YXRlQ2hpbGQoXG4gICAgcm91dGU6IEFjdGl2YXRlZFJvdXRlU25hcHNob3QsXG4gICAgc3RhdGU6IFJvdXRlclN0YXRlU25hcHNob3RcbiAgKTogT2JzZXJ2YWJsZTxib29sZWFuPiB7XG4gICAgcmV0dXJuIHRoaXMuY2FuQWN0aXZhdGUocm91dGUsIHN0YXRlKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBDaGVjaywgaWYgY3VycmVudCBwYWdlIGlzIHB1YmxpYyBmYWxsYmFjayBwYWdlXG4gICAqL1xuICBwcml2YXRlIGlzUHVibGljUGFnZShzdGF0ZTogUm91dGVyU3RhdGVTbmFwc2hvdCk6IGJvb2xlYW4ge1xuICAgIHJldHVybiBzdGF0ZS51cmwgPT09IHRoaXMucHVibGljRmFsbGJhY2tQYWdlVXJpO1xuICB9XG5cbiAgLyoqXG4gICAqIE5hdmlnYXRlIGF3YXkgZnJvbSB0aGUgYXBwIC8gcGF0aFxuICAgKi9cbiAgcHJpdmF0ZSBuYXZpZ2F0ZSh1cmw6IHN0cmluZyk6IHZvaWQge1xuICAgIGlmICh1cmwuc3RhcnRzV2l0aCgnaHR0cCcpKSB7XG4gICAgICB0aGlzLmRvY3VtZW50LmxvY2F0aW9uLmhyZWYgPSB1cmw7XG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMucm91dGVyLm5hdmlnYXRlQnlVcmwodXJsKTtcbiAgICB9XG4gIH1cblxufVxuIl19 |
@@ -5,2 +5,3 @@ /** | ||
*/ | ||
import { DOCUMENT } from '@angular/common'; | ||
import { Injectable, Inject } from '@angular/core'; | ||
@@ -18,2 +19,3 @@ import { Router } from '@angular/router'; | ||
* @export | ||
* \@dynamic | ||
*/ | ||
@@ -24,7 +26,9 @@ export class PublicGuard { | ||
* @param {?} protectedFallbackPageUri | ||
* @param {?} document | ||
* @param {?} router | ||
*/ | ||
constructor(authService, protectedFallbackPageUri, router) { | ||
constructor(authService, protectedFallbackPageUri, document, router) { | ||
this.authService = authService; | ||
this.protectedFallbackPageUri = protectedFallbackPageUri; | ||
this.document = document; | ||
this.router = router; | ||
@@ -72,3 +76,3 @@ } | ||
if (url.startsWith('http')) { | ||
window.location.href = url; | ||
this.document.location.href = url; | ||
} | ||
@@ -87,2 +91,3 @@ else { | ||
{ type: String, decorators: [{ type: Inject, args: [PROTECTED_FALLBACK_PAGE_URI,] }] }, | ||
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] }, | ||
{ type: Router } | ||
@@ -96,4 +101,6 @@ ]; | ||
/** @type {?} */ | ||
PublicGuard.prototype.document; | ||
/** @type {?} */ | ||
PublicGuard.prototype.router; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLmd1YXJkLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWF1dGgvIiwic291cmNlcyI6WyJwdWJsaWMuZ3VhcmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ25ELE9BQU8sRUFHTCxNQUFNLEVBR1AsTUFBTSxpQkFBaUIsQ0FBQztBQUV6QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFckMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzdDLE9BQU8sRUFBRSxZQUFZLEVBQUUsMkJBQTJCLEVBQUUsTUFBTSxVQUFVLENBQUM7Ozs7Ozs7OztBQVdyRSxNQUFNLE9BQU8sV0FBVzs7Ozs7O0lBRXRCLFlBQ2dDLFdBQXdCLEVBQ1Qsd0JBQWdDLEVBQ3JFLE1BQWM7UUFGUSxnQkFBVyxHQUFYLF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lZEZhbGxiYWNrUGFnZVVyaTtcbiAgfVxuXG4gIC8qKlxuICAgKiBOYXZpZ2F0ZSBhd2F5IGZyb20gdGhlIGFwcCAvIHBhdGhcbiAgICovXG4gIHByaXZhdGUgbmF2aWdhdGUodXJsOiBzdHJpbmcpOiB2b2lkIHtcbiAgICBpZiAodXJsLnN0YXJ0c1dpdGgoJ2h0dHAnKSkge1xuICAgICAgdGhpcy5kb2N1bWVudC5sb2NhdGlvbi5ocmVmID0gdXJsO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLnJvdXRlci5uYXZpZ2F0ZUJ5VXJsKHVybCk7XG4gICAgfVxuICB9XG5cbn1cbiJdfQ== |
@@ -108,3 +108,3 @@ /** | ||
/** @type {?} */ | ||
var refreshShouldHappen = authService.refreshShouldHappen(res); | ||
var refreshShouldHappen = authService.refreshShouldHappen(res, req); | ||
if (refreshShouldHappen && !this.refreshInProgress) { | ||
@@ -282,2 +282,2 @@ this.refreshInProgress = true; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC5pbnRlcmNlcHRvci5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1hdXRoLyIsInNvdXJjZXMiOlsiYXV0aC5pbnRlcmNlcHRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3JELE9BQU8sRUFDTCxVQUFVLEVBTVgsTUFBTSxzQkFBc0IsQ0FBQztBQUM5QixPQUFPLEVBQUUsT0FBTyxFQUFjLFVBQVUsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUN2RCxPQUFPLEVBQUUsR0FBRyxFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUUsVUFBVSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFHbkUsT0FBTyxFQUFFLFlBQVksRUFB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Ub2tlblJlcXVlc3Q7XG4gIH1cblxuICAvKipcbiAgICogRXhlYyBvcHRpb25hbCBtZXRob2QsIHdpbGwgYmUgcmVtb3ZlZCBpbiB1cGNvbWluZyB1cGRhdGVzLlxuICAgKiBUZW1wIG1ldGhvZCB1bnRpbCBgdmVyaWZ5VG9rZW5SZXF1ZXN0YCB3aWxsIGJlIGNvbXBsZXRlbHkgcmVwbGFjZWQgd2l0aCBza2lwUmVxdWVzdFxuICAgKi9cbiAgcHJpdmF0ZSBleGVjKG1ldGhvZDogc3RyaW5nLCAuLi5hcmdzOiBhbnlbXSkge1xuICAgIGNvbnN0IGF1dGhTZXJ2aWNlOiBBdXRoU2VydmljZSA9XG4gICAgICB0aGlzLmluamVjdG9yLmdldDxBdXRoU2VydmljZT4oQVVUSF9TRVJWSUNFKTtcblxuICAgIGlmICh0eXBlb2YgYXV0aFNlcnZpY2VbbWV0aG9kXSA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgcmV0dXJuIGF1dGhTZXJ2aWNlW21ldGhvZF0oLi4uYXJncyk7XG4gICAgfVxuICB9XG5cbn1cbiJdfQ== |
@@ -54,5 +54,6 @@ /** | ||
* @param {?} response | ||
* @param {?=} request | ||
* @return {?} | ||
*/ | ||
AuthService.prototype.refreshShouldHappen = function (response) { }; | ||
AuthService.prototype.refreshShouldHappen = function (response, request) { }; | ||
/** | ||
@@ -103,2 +104,2 @@ * Verify that outgoing request is refresh-token, | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWF1dGgvIiwic291cmNlcyI6WyJhdXRoLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFNQTs7Ozs7SUFBQTtJQStEQSxDQUFDO0lBQUQsa0JBQUM7QUFBRCxDQUFDLEFBL0RELElBK0RDOzs7Ozs7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dCBvdXRnb2luZyByZXF1ZXN0IGlzIHJlZnJlc2gtdG9rZW4sXG4gICAqIHNvIGludGVyY2VwdG9yIHdvbid0IGludGVyY2VwdCB0aGlzIHJlcXVlc3RcbiAgICogQGRlcHJlY2F0ZWQgRHVlIHRvIGlsbG9naWNhbCBtZWFuaW5nL2Z1bmN0aW9uYWxpdHkgdGhpcyBtZXRob2QgaXMgZGVwcmVjYXRlZFxuICAgKiBAc2VlIHZlcmlmeVJlZnJlc2hUb2tlblxuICAgKi9cbiAgcHVibGljIGFic3RyYWN0IHZlcmlmeVRva2VuUmVxdWVzdD8odXJsOiBzdHJpbmcpOiBib29sZWFuO1xufVxuIl19 |
@@ -5,2 +5,3 @@ /** | ||
*/ | ||
import { DOCUMENT } from '@angular/common'; | ||
import { Injectable, Inject } from '@angular/core'; | ||
@@ -18,7 +19,9 @@ import { Router } from '@angular/router'; | ||
* @export | ||
* \@dynamic | ||
*/ | ||
var ProtectedGuard = /** @class */ (function () { | ||
function ProtectedGuard(authService, publicFallbackPageUri, router) { | ||
function ProtectedGuard(authService, publicFallbackPageUri, document, router) { | ||
this.authService = authService; | ||
this.publicFallbackPageUri = publicFallbackPageUri; | ||
this.document = document; | ||
this.router = router; | ||
@@ -104,3 +107,3 @@ } | ||
if (url.startsWith('http')) { | ||
window.location.href = url; | ||
this.document.location.href = url; | ||
} | ||
@@ -118,2 +121,3 @@ else { | ||
{ type: String, decorators: [{ type: Inject, args: [PUBLIC_FALLBACK_PAGE_URI,] }] }, | ||
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] }, | ||
{ type: Router } | ||
@@ -130,4 +134,6 @@ ]; }; | ||
/** @type {?} */ | ||
ProtectedGuard.prototype.document; | ||
/** @type {?} */ | ||
ProtectedGuard.prototype.router; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvdGVjdGVkLmd1YXJkLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4L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YW4+IHtcbiAgICByZXR1cm4gdGhpcy5jYW5BY3RpdmF0ZShyb3V0ZSwgc3RhdGUpO1xuICB9XG5cbiAgLyoqXG4gICAqIENoZWNrLCBpZiBjdXJyZW50IHBhZ2UgaXMgcHVibGljIGZhbGxiYWNrIHBhZ2VcbiAgICovXG4gIHByaXZhdGUgaXNQdWJsaWNQYWdlKHN0YXRlOiBSb3V0ZXJTdGF0ZVNuYXBzaG90KTogYm9vbGVhbiB7XG4gICAgcmV0dXJuIHN0YXRlLnVybCA9PT0gdGhpcy5wdWJsaWNGYWxsYmFja1BhZ2VVcmk7XG4gIH1cblxuICAvKipcbiAgICogTmF2aWdhdGUgYXdheSBmcm9tIHRoZSBhcHAgLyBwYXRoXG4gICAqL1xuICBwcml2YXRlIG5hdmlnYXRlKHVybDogc3RyaW5nKTogdm9pZCB7XG4gICAgaWYgKHVybC5zdGFydHNXaXRoKCdodHRwJykpIHtcbiAgICAgIHRoaXMuZG9jdW1lbnQubG9jYXRpb24uaHJlZiA9IHVybDtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhpcy5yb3V0ZXIubmF2aWdhdGVCeVVybCh1cmwpO1xuICAgIH1cbiAgfVxuXG59XG4iXX0= |
@@ -5,2 +5,3 @@ /** | ||
*/ | ||
import { DOCUMENT } from '@angular/common'; | ||
import { Injectable, Inject } from '@angular/core'; | ||
@@ -18,7 +19,9 @@ import { Router } from '@angular/router'; | ||
* @export | ||
* \@dynamic | ||
*/ | ||
var PublicGuard = /** @class */ (function () { | ||
function PublicGuard(authService, protectedFallbackPageUri, router) { | ||
function PublicGuard(authService, protectedFallbackPageUri, document, router) { | ||
this.authService = authService; | ||
this.protectedFallbackPageUri = protectedFallbackPageUri; | ||
this.document = document; | ||
this.router = router; | ||
@@ -101,3 +104,3 @@ } | ||
if (url.startsWith('http')) { | ||
window.location.href = url; | ||
this.document.location.href = url; | ||
} | ||
@@ -115,2 +118,3 @@ else { | ||
{ type: String, decorators: [{ type: Inject, args: [PROTECTED_FALLBACK_PAGE_URI,] }] }, | ||
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] }, | ||
{ type: Router } | ||
@@ -127,4 +131,6 @@ ]; }; | ||
/** @type {?} */ | ||
PublicGuard.prototype.document; | ||
/** @type {?} */ | ||
PublicGuard.prototype.router; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLmd1YXJkLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWF1dGgvIiwic291cmNlcyI6WyJwdWJsaWMuZ3VhcmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ25ELE9BQU8sRUFHTCxNQUFNLEVBR1AsTUFBTSxpQkFBaUIsQ0FBQztBQUV6QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFckMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzdDLE9BQU8sRUFBRSxZQUFZLEVBQUUsMkJBQTJCLEVBQUUsTUFBTSxVQUFVLENBQUM7Ozs7Ozs7OztBQVVyRTtJQUdFLHFCQUNnQyxXQUF3QixFQUNULHdCQUFnQyxFQUNyRSxNQUFjO1FBRlEsZ0JBQVcsR0FBWCxXQUFXLENBQWE7UUFDVCw2QkFBd0IsR0FBeEIsd0JBQXdCLENBQVE7UUFDckUsV0FBTSxHQUFOLE1BQU0sQ0FBUTtJQUNyQixDQUFDO0lBRUo7O09BRUc7Ozs7Ozs7SUFDSSxpQ0FBVzs7Ozs7O0lBQWxCLFVBQ0UsTUFBOEIsRUFDOUIsS0FBMEI7UUFGNUIsaUJBY0M7UUFWQyxPQUFPLElBQUksQ0FBQyxXQUFXLENBQUMsWUFBWSxFQUFFO2FBQ25DLElBQUksQ0FBQyxHQUFHL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ja1BhZ2VVcmk7XG4gIH1cblxuICAvKipcbiAgICogTmF2aWdhdGUgYXdheSBmcm9tIHRoZSBhcHAgLyBwYXRoXG4gICAqL1xuICBwcml2YXRlIG5hdmlnYXRlKHVybDogc3RyaW5nKTogdm9pZCB7XG4gICAgaWYgKHVybC5zdGFydHNXaXRoKCdodHRwJykpIHtcbiAgICAgIHRoaXMuZG9jdW1lbnQubG9jYXRpb24uaHJlZiA9IHVybDtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhpcy5yb3V0ZXIubmF2aWdhdGVCeVVybCh1cmwpO1xuICAgIH1cbiAgfVxuXG59XG4iXX0= |
import { InjectionToken, Injectable, Inject, Injector, NgModule } from '@angular/core'; | ||
import { DOCUMENT } from '@angular/common'; | ||
import { Router } from '@angular/router'; | ||
@@ -40,2 +41,3 @@ import { map, first, switchMap, catchError } from 'rxjs/operators'; | ||
* @export | ||
* \@dynamic | ||
*/ | ||
@@ -46,7 +48,9 @@ class PublicGuard { | ||
* @param {?} protectedFallbackPageUri | ||
* @param {?} document | ||
* @param {?} router | ||
*/ | ||
constructor(authService, protectedFallbackPageUri, router) { | ||
constructor(authService, protectedFallbackPageUri, document, router) { | ||
this.authService = authService; | ||
this.protectedFallbackPageUri = protectedFallbackPageUri; | ||
this.document = document; | ||
this.router = router; | ||
@@ -94,3 +98,3 @@ } | ||
if (url.startsWith('http')) { | ||
window.location.href = url; | ||
this.document.location.href = url; | ||
} | ||
@@ -109,2 +113,3 @@ else { | ||
{ type: String, decorators: [{ type: Inject, args: [PROTECTED_FALLBACK_PAGE_URI,] }] }, | ||
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] }, | ||
{ type: Router } | ||
@@ -124,2 +129,3 @@ ]; | ||
* @export | ||
* \@dynamic | ||
*/ | ||
@@ -130,7 +136,9 @@ class ProtectedGuard { | ||
* @param {?} publicFallbackPageUri | ||
* @param {?} document | ||
* @param {?} router | ||
*/ | ||
constructor(authService, publicFallbackPageUri, router) { | ||
constructor(authService, publicFallbackPageUri, document, router) { | ||
this.authService = authService; | ||
this.publicFallbackPageUri = publicFallbackPageUri; | ||
this.document = document; | ||
this.router = router; | ||
@@ -181,3 +189,3 @@ } | ||
if (url.startsWith('http')) { | ||
window.location.href = url; | ||
this.document.location.href = url; | ||
} | ||
@@ -196,2 +204,3 @@ else { | ||
{ type: String, decorators: [{ type: Inject, args: [PUBLIC_FALLBACK_PAGE_URI,] }] }, | ||
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] }, | ||
{ type: Router } | ||
@@ -265,3 +274,3 @@ ]; | ||
/** @type {?} */ | ||
const refreshShouldHappen = authService.refreshShouldHappen(res); | ||
const refreshShouldHappen = authService.refreshShouldHappen(res, req); | ||
if (refreshShouldHappen && !this.refreshInProgress) { | ||
@@ -400,2 +409,2 @@ this.refreshInProgress = true; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWF1dGguanMubWFwIiwic291cmNlcyI6WyJuZzovL25neC1hdXRoL2F1dGguc2VydmljZS50cyIsIm5nOi8vbmd4LWF1dGgvdG9rZW5zLnRzIiwibmc6Ly9uZ3gtYXV0aC9wdWJsaWMuZ3VhcmQudHMiLCJuZzovL25neC1hdXRoL3Byb3RlY3RlZC5ndWFyZC50cyIsIm5nOi8vbmd4LWF1dGgvYXV0aC5pbnRlcmNlcHRvci50cyIsIm5nOi8vbmd4LWF1dGgvYXV0aC5tb2R1bGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSHR0cFJlcXVlc3QsIEh0dHBFcnJvclJlc3BvbnNlIH0gZnJvbSAnQGFuZ3VsYXIvY29tbW9uL2h0dHAnO1xuaW1wb3J0IHsgT2JzZXJ2YWJsZSB9IGZyb20gJ3J4anMnO1xuXG4vKipcbiAqIEVzc2VudGlhbCBzZXJ2aWNlIGZvciBhdXRoZW50aWNhdGlvblxuICovXG5leHBvcnQgYWJzdHJhY3QgY2xh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s7Ozs7Ozs7Ozs7OzsifQ== |
import { InjectionToken, Injectable, Inject, Injector, NgModule } from '@angular/core'; | ||
import { DOCUMENT } from '@angular/common'; | ||
import { Router } from '@angular/router'; | ||
@@ -48,7 +49,9 @@ import { map, first, switchMap, catchError } from 'rxjs/operators'; | ||
* @export | ||
* \@dynamic | ||
*/ | ||
var PublicGuard = /** @class */ (function () { | ||
function PublicGuard(authService, protectedFallbackPageUri, router) { | ||
function PublicGuard(authService, protectedFallbackPageUri, document, router) { | ||
this.authService = authService; | ||
this.protectedFallbackPageUri = protectedFallbackPageUri; | ||
this.document = document; | ||
this.router = router; | ||
@@ -131,3 +134,3 @@ } | ||
if (url.startsWith('http')) { | ||
window.location.href = url; | ||
this.document.location.href = url; | ||
} | ||
@@ -145,2 +148,3 @@ else { | ||
{ type: String, decorators: [{ type: Inject, args: [PROTECTED_FALLBACK_PAGE_URI,] }] }, | ||
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] }, | ||
{ type: Router } | ||
@@ -162,7 +166,9 @@ ]; }; | ||
* @export | ||
* \@dynamic | ||
*/ | ||
var ProtectedGuard = /** @class */ (function () { | ||
function ProtectedGuard(authService, publicFallbackPageUri, router) { | ||
function ProtectedGuard(authService, publicFallbackPageUri, document, router) { | ||
this.authService = authService; | ||
this.publicFallbackPageUri = publicFallbackPageUri; | ||
this.document = document; | ||
this.router = router; | ||
@@ -248,3 +254,3 @@ } | ||
if (url.startsWith('http')) { | ||
window.location.href = url; | ||
this.document.location.href = url; | ||
} | ||
@@ -262,2 +268,3 @@ else { | ||
{ type: String, decorators: [{ type: Inject, args: [PUBLIC_FALLBACK_PAGE_URI,] }] }, | ||
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] }, | ||
{ type: Router } | ||
@@ -369,3 +376,3 @@ ]; }; | ||
/** @type {?} */ | ||
var refreshShouldHappen = authService.refreshShouldHappen(res); | ||
var refreshShouldHappen = authService.refreshShouldHappen(res, req); | ||
if (refreshShouldHappen && !this.refreshInProgress) { | ||
@@ -565,2 +572,2 @@ this.refreshInProgress = true; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWF1dGguanMubWFwIiwic291cmNlcyI6WyJuZzovL25neC1hdXRoL2F1dGguc2VydmljZS50cyIsIm5nOi8vbmd4LWF1dGgvdG9rZW5zLnRzIiwibmc6Ly9uZ3gtYXV0aC9wdWJsaWMuZ3VhcmQudHMiLCJuZzovL25neC1hdXRoL3Byb3RlY3RlZC5ndWFyZC50cyIsIm5nOi8vbmd4LWF1dGgvYXV0aC5pbnRlcmNlcHRvci50cyIsIm5nOi8vbmd4LWF1dGgvYXV0aC5tb2R1bGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSHR0cFJlcXVlc3QsIEh0dHBFcnJvclJlc3BvbnNlIH0gZnJvbSAnQGFuZ3VsYXIvY29tbW9uL2h0dHAnO1xuaW1wb3J0IHsgT2JzZXJ2YWJsZSB9IGZyb20gJ3J4anMnO1xuXG4vKipcbiAqIEVzc2VudGlhbCBzZXJ2aWNlIGZvciBhdXRoZW50aWNhdGlvblxuICovXG5leHBvcnQgYWJzdHJhY3QgY2xhc3MgQXV0aFNlcnZpY2Uge1xuXG4gIC8qKlxuICAgKiBDaGVjaywgaWYgdXNlciBhbHJlYWR5IGF1dGhvcml6ZWQuXG4gICAqIFNob3VsZCByZXR1cm4gT2JzZXJ2YWJsZSB3aXRoIHRydWUgb3IgZmFsc2UgdmFsdWVzXG4gICAqL1xuICBwdWJsaWMgYWJzdHJhY3QgaXNBdXRob3JpemVkKCk6IE9ic2VydmFibGU8Ym9vbGVhbj47XG5cbiAgLyoqXG4gICAqIEdldCBhY2Nlc3MgdG9rZW5cbiAgICogU2hvdWxkIHJldHVybiBhY2Nlc3MgdG9rZW4gaW4gT2JzZXJ2YWJsZSBmcm9tIGUuZy5cbiAgICogbG9jYWxTdG9yYWdlXG4gICAqL1xuICBw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BhdXRoU2VydmljZVxuICAgICAgICAucmVmcmVzaFRva2VuKClcbiAgICAgICAgLnN1YnNjcmliZShcbiAgICAgICAgICAoKSA9PiB7XG4gICAgICAgICAgICB0aGlzLnJlZnJlc2hJblByb2dyZXNzID0gZmFsc2U7XG4gICAgICAgICAgICB0aGlzLnJlZnJlc2hTdWJqZWN0Lm5leHQodHJ1ZSk7XG4gICAgICAgICAgfSxcbiAgICAgICAgICAoKSA9PiB7XG4gICAgICAgICAgICB0aGlzLnJlZnJlc2hJblByb2dyZXNzID0gZmFsc2U7XG4gICAgICAgICAgICB0aGlzLnJlZnJlc2hTdWJqZWN0Lm5leHQoZmFsc2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICBpZiAocmVmcmVzaFNob3VsZEhhcHBlbiAmJiB0aGlzLnJlZnJlc2hJblByb2dyZXNzKSB7XG4gICAgICByZXR1cm4gdGhpcy5yZXRyeVJlcXVlc3QocmVxLCByZXMpO1xuICAgIH1cblxuICAgIHJldHVybiB0aHJvd0Vycm9yKHJlcyk7XG4gIH1cblxuICAvKipcbiAgICogQWRkIGFjY2VzcyB0b2tlbiB0byBoZWFkZXJzIG9yIHRoZSByZXF1ZXN0XG4gICAqL1xuICBwcml2YXRlIGFkZFRva2VuKHJlcTogSHR0cFJlcXVlc3Q8YW55Pik6IE9ic2VydmFibGU8SHR0cFJlcXVlc3Q8YW55Pj4ge1xuICAgIGNvbnN0IGF1dGhTZXJ2aWNlOiBBdXRoU2VydmljZSA9XG4gICAgICB0aGlzLmluamVjdG9yLmdldDxBdXRoU2VydmljZT4oQVVUSF9TRVJWSUNFKTtcblxuICAgIHJldHVybiBhdXRoU2VydmljZS5nZXRBY2Nlc3NUb2tlbigpXG4gICAgICAucGlwZShcbiAgICAgICAgbWFwKCh0b2tlbjogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgaWYgKHRva2VuKSB7XG4gICAgICAgICAgICBsZXQgc2V0SGVhZGVyczogeyBbb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9CLEVBQUUsR0FBRyxDQUFDOzs7WUFHekQsa0JBQWtCLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FBQyxvQkFBb0IsRUFBRSxHQUFHLENBQUMsR0FBRyxDQUFDO1FBRW5FLE9BQU8sV0FBVyxJQUFJLGtCQUFrQixJQUFJLGtCQUFrQixDQUFDO0tBQ2hFOzs7Ozs7Ozs7Ozs7SUFNTyw4QkFBSTs7Ozs7OztJQUFaLFVBQWEsTUFBYztRQUFFLGNBQWM7YUFBZCxVQUFjLEVBQWQscUJBQWMsRUFBZCxJQUFjO1lBQWQsNkJBQWM7OztZQUNuQyxXQUFXLEdBQ2YsSUFBSSxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQWMsWUFBWSxDQUFDO1FBRTlDLElBQUksT0FBTyxXQUFXLENBQUMsTUFBTSxDQUFDLEtBQUssVUFBVSxFQUFFO1lBQzdDLE9BQU8sV0FBVyxDQUFDLE1BQU0sQ0FBQyxPQUFuQixXQUFXLFdBQVksSUFBSSxHQUFFO1NBQ3JDO0tBQ0Y7O2dCQWpMRixVQUFVOzs7O2dCQWZVLFFBQVE7O0lBa003QixzQkFBQztDQW5MRDs7Ozs7O0FDZkE7SUFPQTtLQWFDOztnQkFiQSxRQUFRLFNBQUM7b0JBQ1IsU0FBUyxFQUFFO3dCQUNULFdBQVc7d0JBQ1gsY0FBYzt3QkFDZCxlQUFlO3dCQUNmOzRCQUNFLE9BQU8sRUFBRSxpQkFBaUI7NEJBQzFCLFFBQVEsRUFBRSxlQUFlOzRCQUN6QixLQUFLLEVBQUUsSUFBSTt5QkFDWjtxQkFDRjtpQkFDRjs7SUFFRCxpQkFBQztDQWJEOzs7Ozs7Ozs7Ozs7OzsifQ== |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"AuthService":{"__symbolic":"class","members":{"isAuthorized":[{"__symbolic":"method"}],"getAccessToken":[{"__symbolic":"method"}],"refreshToken":[{"__symbolic":"method"}],"refreshShouldHappen":[{"__symbolic":"method"}],"verifyRefreshToken":[{"__symbolic":"method"}],"skipRequest":[{"__symbolic":"method"}],"getHeaders":[{"__symbolic":"method"}],"setInterruptedUrl":[{"__symbolic":"method"}],"verifyTokenRequest":[{"__symbolic":"method"}]}},"PublicGuard":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":22,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":26,"character":5},"arguments":[{"__symbolic":"reference","name":"AUTH_SERVICE"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":27,"character":5},"arguments":[{"__symbolic":"reference","name":"PROTECTED_FALLBACK_PAGE_URI"}]}],null],"parameters":[{"__symbolic":"reference","name":"AuthService"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":28,"character":20}]}],"canActivate":[{"__symbolic":"method"}],"canActivateChild":[{"__symbolic":"method"}],"isProtectedPage":[{"__symbolic":"method"}],"navigate":[{"__symbolic":"method"}]}},"ProtectedGuard":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":22,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":26,"character":5},"arguments":[{"__symbolic":"reference","name":"AUTH_SERVICE"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":27,"character":5},"arguments":[{"__symbolic":"reference","name":"PUBLIC_FALLBACK_PAGE_URI"}]}],null],"parameters":[{"__symbolic":"reference","name":"AuthService"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":28,"character":20}]}],"canActivate":[{"__symbolic":"method"}],"canActivateChild":[{"__symbolic":"method"}],"isPublicPage":[{"__symbolic":"method"}],"navigate":[{"__symbolic":"method"}]}},"AUTH_SERVICE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":32},"arguments":["AUTH_SERVICE"]},"PUBLIC_FALLBACK_PAGE_URI":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":44},"arguments":["PUBLIC_FALLBACK_PAGE_URI"]},"PROTECTED_FALLBACK_PAGE_URI":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":47},"arguments":["PROTECTED_FALLBACK_PAGE_URI"]},"AuthModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"providers":[{"__symbolic":"reference","name":"PublicGuard"},{"__symbolic":"reference","name":"ProtectedGuard"},{"__symbolic":"reference","name":"ɵa"},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HTTP_INTERCEPTORS","line":13,"character":15},"useClass":{"__symbolic":"reference","name":"ɵa"},"multi":true}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":15,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":28,"character":32}]}],"intercept":[{"__symbolic":"method"}],"processIntercept":[{"__symbolic":"method"}],"request":[{"__symbolic":"method"}],"responseError":[{"__symbolic":"method"}],"addToken":[{"__symbolic":"method"}],"delayRequest":[{"__symbolic":"method"}],"retryRequest":[{"__symbolic":"method"}],"skipRequest":[{"__symbolic":"method"}],"exec":[{"__symbolic":"method"}]}}},"origins":{"AuthService":"./auth.service","PublicGuard":"./public.guard","ProtectedGuard":"./protected.guard","AUTH_SERVICE":"./tokens","PUBLIC_FALLBACK_PAGE_URI":"./tokens","PROTECTED_FALLBACK_PAGE_URI":"./tokens","AuthModule":"./auth.module","ɵa":"./auth.interceptor"},"importAs":"ngx-auth"} | ||
{"__symbolic":"module","version":4,"metadata":{"AuthService":{"__symbolic":"class","members":{"isAuthorized":[{"__symbolic":"method"}],"getAccessToken":[{"__symbolic":"method"}],"refreshToken":[{"__symbolic":"method"}],"refreshShouldHappen":[{"__symbolic":"method"}],"verifyRefreshToken":[{"__symbolic":"method"}],"skipRequest":[{"__symbolic":"method"}],"getHeaders":[{"__symbolic":"method"}],"setInterruptedUrl":[{"__symbolic":"method"}],"verifyTokenRequest":[{"__symbolic":"method"}]}},"PublicGuard":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":24,"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":"AUTH_SERVICE"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":29,"character":5},"arguments":[{"__symbolic":"reference","name":"PROTECTED_FALLBACK_PAGE_URI"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":30,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":30,"character":12}]}],null],"parameters":[{"__symbolic":"reference","name":"AuthService"},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Could not resolve type","line":30,"character":49,"context":{"typeName":"Document"},"module":"./public.guard"},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":31,"character":20}]}],"canActivate":[{"__symbolic":"method"}],"canActivateChild":[{"__symbolic":"method"}],"isProtectedPage":[{"__symbolic":"method"}],"navigate":[{"__symbolic":"method"}]}},"ProtectedGuard":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":24,"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":"AUTH_SERVICE"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":29,"character":5},"arguments":[{"__symbolic":"reference","name":"PUBLIC_FALLBACK_PAGE_URI"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":30,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":30,"character":12}]}],null],"parameters":[{"__symbolic":"reference","name":"AuthService"},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Could not resolve type","line":30,"character":49,"context":{"typeName":"Document"},"module":"./protected.guard"},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":31,"character":20}]}],"canActivate":[{"__symbolic":"method"}],"canActivateChild":[{"__symbolic":"method"}],"isPublicPage":[{"__symbolic":"method"}],"navigate":[{"__symbolic":"method"}]}},"AUTH_SERVICE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":32},"arguments":["AUTH_SERVICE"]},"PUBLIC_FALLBACK_PAGE_URI":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":44},"arguments":["PUBLIC_FALLBACK_PAGE_URI"]},"PROTECTED_FALLBACK_PAGE_URI":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":47},"arguments":["PROTECTED_FALLBACK_PAGE_URI"]},"AuthModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"providers":[{"__symbolic":"reference","name":"PublicGuard"},{"__symbolic":"reference","name":"ProtectedGuard"},{"__symbolic":"reference","name":"ɵa"},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HTTP_INTERCEPTORS","line":13,"character":15},"useClass":{"__symbolic":"reference","name":"ɵa"},"multi":true}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":15,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":28,"character":32}]}],"intercept":[{"__symbolic":"method"}],"processIntercept":[{"__symbolic":"method"}],"request":[{"__symbolic":"method"}],"responseError":[{"__symbolic":"method"}],"addToken":[{"__symbolic":"method"}],"delayRequest":[{"__symbolic":"method"}],"retryRequest":[{"__symbolic":"method"}],"skipRequest":[{"__symbolic":"method"}],"exec":[{"__symbolic":"method"}]}}},"origins":{"AuthService":"./auth.service","PublicGuard":"./public.guard","ProtectedGuard":"./protected.guard","AUTH_SERVICE":"./tokens","PUBLIC_FALLBACK_PAGE_URI":"./tokens","PROTECTED_FALLBACK_PAGE_URI":"./tokens","AuthModule":"./auth.module","ɵa":"./auth.interceptor"},"importAs":"ngx-auth"} |
{ | ||
"name": "ngx-auth", | ||
"version": "5.3.0", | ||
"version": "5.4.0", | ||
"description": "Angular 7+ Authentication module", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/serhiisol/ngx-auth", |
@@ -11,2 +11,3 @@ import { Router, CanActivate, CanActivateChild, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; | ||
* @export | ||
* @dynamic | ||
*/ | ||
@@ -16,4 +17,5 @@ export declare class ProtectedGuard implements CanActivate, CanActivateChild { | ||
private publicFallbackPageUri; | ||
private readonly document; | ||
private router; | ||
constructor(authService: AuthService, publicFallbackPageUri: string, router: Router); | ||
constructor(authService: AuthService, publicFallbackPageUri: string, document: Document, router: Router); | ||
/** | ||
@@ -20,0 +22,0 @@ * CanActivate handler |
@@ -11,2 +11,3 @@ import { CanActivate, CanActivateChild, Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; | ||
* @export | ||
* @dynamic | ||
*/ | ||
@@ -16,4 +17,5 @@ export declare class PublicGuard implements CanActivate, CanActivateChild { | ||
private protectedFallbackPageUri; | ||
private readonly document; | ||
private router; | ||
constructor(authService: AuthService, protectedFallbackPageUri: string, router: Router); | ||
constructor(authService: AuthService, protectedFallbackPageUri: string, document: Document, router: Router); | ||
/** | ||
@@ -20,0 +22,0 @@ * CanActivate handler |
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
Possible typosquat attack
Supply chain riskThere is a package with a similar name that is downloaded much more often.
Did you mean |
---|
next-auth |
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
361852
3005
1