@dontdrinkandroot/ngx-extensions 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/src/cookie/cookie.service.mjs +3 -3
- package/esm2020/src/ddr-extensions.module.mjs +11 -11
- package/esm2020/src/http/redirect-to-login-interceptor.service.mjs +3 -3
- package/esm2020/src/http/with-credentials-interceptor.service.mjs +3 -3
- package/esm2020/src/image/lazy-image.directive.mjs +3 -3
- package/esm2020/src/jwt/jwt-interceptor.service.mjs +3 -3
- package/esm2020/src/jwt/jwt-refresh-token-interceptor.service.mjs +3 -3
- package/esm2020/src/jwt/jwt.service.mjs +9 -7
- package/esm2020/src/logger/console-logger.service.mjs +14 -14
- package/esm2020/src/logger/logger.service.mjs +2 -2
- package/esm2020/src/oauth/oauth2-access-token-interceptor.service.mjs +3 -3
- package/esm2020/src/oauth/oauth2-refresh-token-interceptor.service.mjs +3 -3
- package/esm2020/src/oauth/oauth2.module.mjs +4 -4
- package/esm2020/src/oauth/oauth2.service.mjs +16 -10
- package/esm2020/src/oauth/redirect-to-oauth2-login-interceptor.service.mjs +3 -3
- package/esm2020/src/scroll/bottom-hit.directive.mjs +3 -3
- package/esm2020/src/scroll/scroll.service.mjs +3 -3
- package/esm2020/src/storage/local-storage.service.mjs +7 -7
- package/esm2020/src/visibility/visibility.service.mjs +4 -4
- package/fesm2015/dontdrinkandroot-ngx-extensions.mjs +85 -79
- package/fesm2015/dontdrinkandroot-ngx-extensions.mjs.map +1 -1
- package/fesm2020/dontdrinkandroot-ngx-extensions.mjs +85 -79
- package/fesm2020/dontdrinkandroot-ngx-extensions.mjs.map +1 -1
- package/package.json +1 -1
- package/src/jwt/jwt.service.d.ts +3 -1
- package/src/logger/console-logger.service.d.ts +8 -8
- package/src/logger/logger.service.d.ts +5 -5
- package/src/oauth/oauth2.service.d.ts +3 -1
- package/src/storage/local-storage.service.d.ts +4 -4
- package/src/visibility/visibility.service.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DDR_STORAGE_PREFIX, StorageService } from
|
|
2
|
-
import { Inject, Injectable } from
|
|
1
|
+
import { DDR_STORAGE_PREFIX, StorageService } from './storage.service';
|
|
2
|
+
import { Inject, Injectable } from '@angular/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "../logger/logger.service";
|
|
5
5
|
export class LocalStorageService extends StorageService {
|
|
@@ -42,12 +42,12 @@ export class LocalStorageService extends StorageService {
|
|
|
42
42
|
return this.storagePrefix + '.' + key;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
LocalStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
46
|
-
LocalStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
45
|
+
LocalStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: LocalStorageService, deps: [{ token: DDR_STORAGE_PREFIX }, { token: i1.Logger }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
46
|
+
LocalStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: LocalStorageService });
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: LocalStorageService, decorators: [{
|
|
48
48
|
type: Injectable
|
|
49
49
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
50
50
|
type: Inject,
|
|
51
51
|
args: [DDR_STORAGE_PREFIX]
|
|
52
|
-
}] }, { type: i1.
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
52
|
+
}] }, { type: i1.Logger }]; } });
|
|
53
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2Z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5zdHJpbmdpZnkodmFsdWUpKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAb3ZlcnJpZGVcbiAgICAgKi9cbiAgICBwdWJsaWMgcmVtb3ZlKGtleTogc3RyaW5nKVxuICAgIHtcbiAgICAgICAgbG9jYWxTdG9yYWdlLnJlbW92ZUl0ZW0odGhpcy5nZXRGdWxsS2V5KGtleSkpO1xuICAgIH1cblxuICAgIHByb3RlY3RlZCBnZXRGdWxsS2V5KGtleTogc3RyaW5nKTogc3RyaW5nXG4gICAge1xuICAgICAgICByZXR1cm4gdGhpcy5zdG9yYWdlUHJlZml4ICsgJy4nICsga2V5O1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -10,10 +10,10 @@ export class VisibilityService {
|
|
|
10
10
|
return this.visibility$;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
VisibilityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
14
|
-
VisibilityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
13
|
+
VisibilityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: VisibilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
14
|
+
VisibilityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: VisibilityService, providedIn: 'root' });
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: VisibilityService, decorators: [{
|
|
16
16
|
type: Injectable,
|
|
17
17
|
args: [{ providedIn: 'root' }]
|
|
18
18
|
}], ctorParameters: function () { return []; } });
|
|
19
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJza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2JzZXJ2YWJsZTxib29sZWFuPlxuICAgIHtcbiAgICAgICAgcmV0dXJuIHRoaXMudmlzaWJpbGl0eSQ7XG4gICAgfVxufVxuIl19
|
|
@@ -171,15 +171,15 @@ class LazyImageDirective {
|
|
|
171
171
|
return window.getComputedStyle(element).display === 'none';
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
LazyImageDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
175
|
-
LazyImageDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.
|
|
174
|
+
LazyImageDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: LazyImageDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
175
|
+
LazyImageDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.4", type: LazyImageDirective, selector: "[ddrLazyImage]", inputs: { src: ["ddrLazyImage", "src"], objectFit: "objectFit", offset: "offset" }, host: { listeners: { "window:resize": "windowResized($event)", "window:scroll": "windowScroll($event)" }, properties: { "src": "this.hostSrc", "style.width.px": "this.hostStyleWidthPx", "style.height.px": "this.hostStyleHeightPx", "style.object-fit": "this.hostStyleObjectFit" } }, usesOnChanges: true, ngImport: i0 });
|
|
176
176
|
__decorate([
|
|
177
177
|
Debounce()
|
|
178
178
|
], LazyImageDirective.prototype, "windowResized", null);
|
|
179
179
|
__decorate([
|
|
180
180
|
Limit()
|
|
181
181
|
], LazyImageDirective.prototype, "windowScroll", null);
|
|
182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: LazyImageDirective, decorators: [{
|
|
183
183
|
type: Directive,
|
|
184
184
|
args: [{ selector: '[ddrLazyImage]' }]
|
|
185
185
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { src: [{
|
|
@@ -240,15 +240,15 @@ class BottomHitDirective {
|
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
BottomHitDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
244
|
-
BottomHitDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.
|
|
243
|
+
BottomHitDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: BottomHitDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
244
|
+
BottomHitDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.4", type: BottomHitDirective, selector: "[ddrBottomHit]", outputs: { onWindowBottomHit: "onWindowBottomHit", onElementBottomHit: "onElementBottomHit" }, host: { listeners: { "scroll": "scrolled($event)", "window:scroll": "windowScrolled($event)" } }, ngImport: i0 });
|
|
245
245
|
__decorate([
|
|
246
246
|
Limit()
|
|
247
247
|
], BottomHitDirective.prototype, "scrolled", null);
|
|
248
248
|
__decorate([
|
|
249
249
|
Limit()
|
|
250
250
|
], BottomHitDirective.prototype, "windowScrolled", null);
|
|
251
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: BottomHitDirective, decorators: [{
|
|
252
252
|
type: Directive,
|
|
253
253
|
args: [{
|
|
254
254
|
selector: '[ddrBottomHit]'
|
|
@@ -265,7 +265,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImpor
|
|
|
265
265
|
args: ['window:scroll', ['$event']]
|
|
266
266
|
}] } });
|
|
267
267
|
|
|
268
|
-
class
|
|
268
|
+
class Logger {
|
|
269
269
|
constructor() {
|
|
270
270
|
this.debugEnabled = false;
|
|
271
271
|
this.infoEnabled = true;
|
|
@@ -274,43 +274,43 @@ class LoggerService {
|
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
class
|
|
277
|
+
class ConsoleLogger extends Logger {
|
|
278
278
|
/**
|
|
279
279
|
* @override
|
|
280
280
|
*/
|
|
281
|
-
debug(
|
|
281
|
+
debug(...data) {
|
|
282
282
|
if (this.debugEnabled) {
|
|
283
|
-
console.debug(
|
|
283
|
+
console.debug(...data);
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
/**
|
|
287
287
|
* @override
|
|
288
288
|
*/
|
|
289
|
-
info(
|
|
289
|
+
info(...data) {
|
|
290
290
|
if (this.infoEnabled) {
|
|
291
|
-
console.info(
|
|
291
|
+
console.info(...data);
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
/**
|
|
295
295
|
* @override
|
|
296
296
|
*/
|
|
297
|
-
warn(
|
|
297
|
+
warn(...data) {
|
|
298
298
|
if (this.warnEnabled) {
|
|
299
|
-
console.warn(
|
|
299
|
+
console.warn(...data);
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
/**
|
|
303
303
|
* @override
|
|
304
304
|
*/
|
|
305
|
-
error(
|
|
305
|
+
error(...data) {
|
|
306
306
|
if (this.errorEnabled) {
|
|
307
|
-
console.error(
|
|
307
|
+
console.error(...data);
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
311
|
+
ConsoleLogger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: ConsoleLogger, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
312
|
+
ConsoleLogger.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: ConsoleLogger });
|
|
313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: ConsoleLogger, decorators: [{
|
|
314
314
|
type: Injectable
|
|
315
315
|
}] });
|
|
316
316
|
|
|
@@ -358,33 +358,33 @@ class LocalStorageService extends StorageService {
|
|
|
358
358
|
return this.storagePrefix + '.' + key;
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
LocalStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
362
|
-
LocalStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
363
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
361
|
+
LocalStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: LocalStorageService, deps: [{ token: DDR_STORAGE_PREFIX }, { token: Logger }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
362
|
+
LocalStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: LocalStorageService });
|
|
363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: LocalStorageService, decorators: [{
|
|
364
364
|
type: Injectable
|
|
365
365
|
}], ctorParameters: function () {
|
|
366
366
|
return [{ type: undefined, decorators: [{
|
|
367
367
|
type: Inject,
|
|
368
368
|
args: [DDR_STORAGE_PREFIX]
|
|
369
|
-
}] }, { type:
|
|
369
|
+
}] }, { type: Logger }];
|
|
370
370
|
} });
|
|
371
371
|
|
|
372
372
|
const DDR_JWT_REFRESH_TOKEN_URL = new InjectionToken('DDR_JWT_REFRESH_TOKEN_URL');
|
|
373
373
|
const DDR_LOGIN_PATH = new InjectionToken('DDR_LOGIN_PATH');
|
|
374
374
|
class DdrExtensionsModule {
|
|
375
375
|
}
|
|
376
|
-
DdrExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
377
|
-
DdrExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
376
|
+
DdrExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: DdrExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
377
|
+
DdrExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.4", ngImport: i0, type: DdrExtensionsModule, declarations: [LazyImageDirective,
|
|
378
378
|
BottomHitDirective], exports: [LazyImageDirective,
|
|
379
379
|
BottomHitDirective] });
|
|
380
|
-
DdrExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
380
|
+
DdrExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: DdrExtensionsModule, providers: [
|
|
381
381
|
{
|
|
382
382
|
provide: DDR_LOGIN_PATH,
|
|
383
383
|
useValue: '/login'
|
|
384
384
|
},
|
|
385
385
|
{
|
|
386
|
-
provide:
|
|
387
|
-
useClass:
|
|
386
|
+
provide: Logger,
|
|
387
|
+
useClass: ConsoleLogger
|
|
388
388
|
},
|
|
389
389
|
{
|
|
390
390
|
provide: DDR_STORAGE_PREFIX,
|
|
@@ -395,7 +395,7 @@ DdrExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ver
|
|
|
395
395
|
useClass: LocalStorageService
|
|
396
396
|
},
|
|
397
397
|
] });
|
|
398
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: DdrExtensionsModule, decorators: [{
|
|
399
399
|
type: NgModule,
|
|
400
400
|
args: [{
|
|
401
401
|
declarations: [
|
|
@@ -409,8 +409,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImpor
|
|
|
409
409
|
useValue: '/login'
|
|
410
410
|
},
|
|
411
411
|
{
|
|
412
|
-
provide:
|
|
413
|
-
useClass:
|
|
412
|
+
provide: Logger,
|
|
413
|
+
useClass: ConsoleLogger
|
|
414
414
|
},
|
|
415
415
|
{
|
|
416
416
|
provide: DDR_STORAGE_PREFIX,
|
|
@@ -546,9 +546,9 @@ class CookieService {
|
|
|
546
546
|
return new RegExp('(?:^' + escapedName + '|;\\s*' + escapedName + ')=(.*?)(?:;|$)', 'g');
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
CookieService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
550
|
-
CookieService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
551
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
549
|
+
CookieService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: CookieService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
550
|
+
CookieService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: CookieService, providedIn: 'root' });
|
|
551
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: CookieService, decorators: [{
|
|
552
552
|
type: Injectable,
|
|
553
553
|
args: [{
|
|
554
554
|
providedIn: 'root'
|
|
@@ -629,9 +629,9 @@ class ScrollService {
|
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
ScrollService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
633
|
-
ScrollService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
634
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
632
|
+
ScrollService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: ScrollService, deps: [{ token: i1.Router }, { token: i2.ViewportScroller }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
633
|
+
ScrollService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: ScrollService, providedIn: 'root' });
|
|
634
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: ScrollService, decorators: [{
|
|
635
635
|
type: Injectable,
|
|
636
636
|
args: [{
|
|
637
637
|
providedIn: 'root'
|
|
@@ -646,9 +646,9 @@ class VisibilityService {
|
|
|
646
646
|
return this.visibility$;
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
|
-
VisibilityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
650
|
-
VisibilityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
651
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
649
|
+
VisibilityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: VisibilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
650
|
+
VisibilityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: VisibilityService, providedIn: 'root' });
|
|
651
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: VisibilityService, decorators: [{
|
|
652
652
|
type: Injectable,
|
|
653
653
|
args: [{ providedIn: 'root' }]
|
|
654
654
|
}], ctorParameters: function () { return []; } });
|
|
@@ -664,9 +664,9 @@ class WithCredentialsInterceptor {
|
|
|
664
664
|
return next.handle(cloned);
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
|
-
WithCredentialsInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
668
|
-
WithCredentialsInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
669
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
667
|
+
WithCredentialsInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: WithCredentialsInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
668
|
+
WithCredentialsInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: WithCredentialsInterceptor });
|
|
669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: WithCredentialsInterceptor, decorators: [{
|
|
670
670
|
type: Injectable
|
|
671
671
|
}] });
|
|
672
672
|
|
|
@@ -715,9 +715,9 @@ class RedirectToLoginInterceptor {
|
|
|
715
715
|
}));
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
|
-
RedirectToLoginInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
719
|
-
RedirectToLoginInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
720
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
718
|
+
RedirectToLoginInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: RedirectToLoginInterceptor, deps: [{ token: i1.Router }, { token: DDR_LOGIN_PATH }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
719
|
+
RedirectToLoginInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: RedirectToLoginInterceptor });
|
|
720
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: RedirectToLoginInterceptor, decorators: [{
|
|
721
721
|
type: Injectable
|
|
722
722
|
}], ctorParameters: function () {
|
|
723
723
|
return [{ type: i1.Router }, { type: undefined, decorators: [{
|
|
@@ -745,9 +745,10 @@ OAuth2Error.CODE_NOT_FOUND = 'code_not_found';
|
|
|
745
745
|
OAuth2Error.ACCESS_DENIED = 'access_denied';
|
|
746
746
|
|
|
747
747
|
class OAuth2Service {
|
|
748
|
-
constructor(route, httpClient, config) {
|
|
748
|
+
constructor(route, httpClient, loggerService, config) {
|
|
749
749
|
this.route = route;
|
|
750
750
|
this.httpClient = httpClient;
|
|
751
|
+
this.loggerService = loggerService;
|
|
751
752
|
this.config = config;
|
|
752
753
|
this.accessTokenString = null;
|
|
753
754
|
this.accessToken = null;
|
|
@@ -803,12 +804,16 @@ class OAuth2Service {
|
|
|
803
804
|
}
|
|
804
805
|
performRefresh() {
|
|
805
806
|
if (null == this.refreshTokenRequest$) {
|
|
806
|
-
|
|
807
|
+
this.loggerService.info('Performing token refesh');
|
|
807
808
|
const params = new HttpParams()
|
|
808
809
|
.set('grant_type', 'refresh_token')
|
|
809
810
|
.set('refresh_token', TypeUtils.notNull(this.getRefreshToken()))
|
|
810
811
|
.set('client_id', this.config.clientId);
|
|
811
|
-
this.refreshTokenRequest$ = this.httpClient.post(this.config.tokenUri, params).pipe(map(tokenResponse =>
|
|
812
|
+
this.refreshTokenRequest$ = this.httpClient.post(this.config.tokenUri, params).pipe(map(tokenResponse => {
|
|
813
|
+
const token = this.processTokenResponse(tokenResponse);
|
|
814
|
+
this.refreshTokenRequest$ = null;
|
|
815
|
+
return token;
|
|
816
|
+
}), catchError(error => {
|
|
812
817
|
this.accessTokenString = null;
|
|
813
818
|
this.accessToken = null;
|
|
814
819
|
localStorage.removeItem(OAuth2Service.STORAGE_KEY_REFRESH_TOKEN);
|
|
@@ -822,7 +827,7 @@ class OAuth2Service {
|
|
|
822
827
|
localStorage.removeItem(OAuth2Service.STORAGE_KEY_CHALLENGE);
|
|
823
828
|
this.accessTokenString = tokenResponse.access_token;
|
|
824
829
|
this.accessToken = JSON.parse(atob(tokenResponse.access_token.split('.')[1]));
|
|
825
|
-
|
|
830
|
+
this.loggerService.info('Access Token Expiry', new Date(this.accessToken.exp * 1000));
|
|
826
831
|
localStorage.setItem(OAuth2Service.STORAGE_KEY_REFRESH_TOKEN, tokenResponse.refresh_token);
|
|
827
832
|
return this.accessToken;
|
|
828
833
|
}
|
|
@@ -842,12 +847,12 @@ class OAuth2Service {
|
|
|
842
847
|
OAuth2Service.STORAGE_KEY_CHALLENGE = 'ddr_oauth2_challenge';
|
|
843
848
|
OAuth2Service.STORAGE_KEY_REFRESH_TOKEN = 'ddr_oauth2_refresh_token';
|
|
844
849
|
OAuth2Service.STORAGE_KEY_RETURN_URL = 'ddr_oauth2_return_url';
|
|
845
|
-
OAuth2Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
846
|
-
OAuth2Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
847
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
850
|
+
OAuth2Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: OAuth2Service, deps: [{ token: i1.ActivatedRoute }, { token: i2$1.HttpClient }, { token: Logger }, { token: DDR_OAUTH2_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
851
|
+
OAuth2Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: OAuth2Service });
|
|
852
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: OAuth2Service, decorators: [{
|
|
848
853
|
type: Injectable
|
|
849
854
|
}], ctorParameters: function () {
|
|
850
|
-
return [{ type: i1.ActivatedRoute }, { type: i2$1.HttpClient }, { type: OAuth2Config, decorators: [{
|
|
855
|
+
return [{ type: i1.ActivatedRoute }, { type: i2$1.HttpClient }, { type: Logger }, { type: OAuth2Config, decorators: [{
|
|
851
856
|
type: Inject,
|
|
852
857
|
args: [DDR_OAUTH2_CONFIG]
|
|
853
858
|
}] }];
|
|
@@ -867,9 +872,9 @@ class OAuth2RefreshTokenInterceptor {
|
|
|
867
872
|
return next.handle(req);
|
|
868
873
|
}
|
|
869
874
|
}
|
|
870
|
-
OAuth2RefreshTokenInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
871
|
-
OAuth2RefreshTokenInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
872
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
875
|
+
OAuth2RefreshTokenInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: OAuth2RefreshTokenInterceptor, deps: [{ token: OAuth2Service }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
876
|
+
OAuth2RefreshTokenInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: OAuth2RefreshTokenInterceptor });
|
|
877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: OAuth2RefreshTokenInterceptor, decorators: [{
|
|
873
878
|
type: Injectable
|
|
874
879
|
}], ctorParameters: function () { return [{ type: OAuth2Service }]; } });
|
|
875
880
|
|
|
@@ -896,9 +901,9 @@ class RedirectToOAuth2LoginInterceptor {
|
|
|
896
901
|
}));
|
|
897
902
|
}
|
|
898
903
|
}
|
|
899
|
-
RedirectToOAuth2LoginInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
900
|
-
RedirectToOAuth2LoginInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
901
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
904
|
+
RedirectToOAuth2LoginInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: RedirectToOAuth2LoginInterceptor, deps: [{ token: OAuth2Service }, { token: i1.Router }, { token: DDR_OAUTH2_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
905
|
+
RedirectToOAuth2LoginInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: RedirectToOAuth2LoginInterceptor });
|
|
906
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: RedirectToOAuth2LoginInterceptor, decorators: [{
|
|
902
907
|
type: Injectable
|
|
903
908
|
}], ctorParameters: function () {
|
|
904
909
|
return [{ type: OAuth2Service }, { type: i1.Router }, { type: OAuth2Config, decorators: [{
|
|
@@ -924,9 +929,9 @@ class OAuth2AccessTokenInterceptor {
|
|
|
924
929
|
return next.handle(req);
|
|
925
930
|
}
|
|
926
931
|
}
|
|
927
|
-
OAuth2AccessTokenInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
928
|
-
OAuth2AccessTokenInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
929
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
932
|
+
OAuth2AccessTokenInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: OAuth2AccessTokenInterceptor, deps: [{ token: OAuth2Service }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
933
|
+
OAuth2AccessTokenInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: OAuth2AccessTokenInterceptor });
|
|
934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: OAuth2AccessTokenInterceptor, decorators: [{
|
|
930
935
|
type: Injectable
|
|
931
936
|
}], ctorParameters: function () { return [{ type: OAuth2Service }]; } });
|
|
932
937
|
|
|
@@ -959,10 +964,10 @@ class OAuth2Module {
|
|
|
959
964
|
};
|
|
960
965
|
}
|
|
961
966
|
}
|
|
962
|
-
OAuth2Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
963
|
-
OAuth2Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
964
|
-
OAuth2Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
965
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
967
|
+
OAuth2Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: OAuth2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
968
|
+
OAuth2Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.4", ngImport: i0, type: OAuth2Module });
|
|
969
|
+
OAuth2Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: OAuth2Module });
|
|
970
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: OAuth2Module, decorators: [{
|
|
966
971
|
type: NgModule
|
|
967
972
|
}] });
|
|
968
973
|
|
|
@@ -971,8 +976,9 @@ function isNonNull(value) {
|
|
|
971
976
|
}
|
|
972
977
|
|
|
973
978
|
class JwtService {
|
|
974
|
-
constructor(storageService) {
|
|
979
|
+
constructor(storageService, loggerService) {
|
|
975
980
|
this.storageService = storageService;
|
|
981
|
+
this.loggerService = loggerService;
|
|
976
982
|
/**
|
|
977
983
|
* The current token.
|
|
978
984
|
*/
|
|
@@ -996,7 +1002,7 @@ class JwtService {
|
|
|
996
1002
|
this.token = token;
|
|
997
1003
|
const decodedToken = JSON.parse(atob(token.split('.')[1]));
|
|
998
1004
|
this.tokenExpiry = decodedToken.exp * 1000;
|
|
999
|
-
|
|
1005
|
+
this.loggerService.info('New refresh token, expiry', new Date(this.tokenExpiry));
|
|
1000
1006
|
}
|
|
1001
1007
|
/**
|
|
1002
1008
|
* Gets the current token.
|
|
@@ -1037,14 +1043,14 @@ class JwtService {
|
|
|
1037
1043
|
return 'jwt.refresh_token';
|
|
1038
1044
|
}
|
|
1039
1045
|
}
|
|
1040
|
-
JwtService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1041
|
-
JwtService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1042
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1046
|
+
JwtService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: JwtService, deps: [{ token: StorageService }, { token: Logger }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1047
|
+
JwtService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: JwtService, providedIn: 'root' });
|
|
1048
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: JwtService, decorators: [{
|
|
1043
1049
|
type: Injectable,
|
|
1044
1050
|
args: [{
|
|
1045
1051
|
providedIn: 'root'
|
|
1046
1052
|
}]
|
|
1047
|
-
}], ctorParameters: function () { return [{ type: StorageService }]; } });
|
|
1053
|
+
}], ctorParameters: function () { return [{ type: StorageService }, { type: Logger }]; } });
|
|
1048
1054
|
|
|
1049
1055
|
class JwtInterceptor {
|
|
1050
1056
|
constructor(jwtService) {
|
|
@@ -1063,9 +1069,9 @@ class JwtInterceptor {
|
|
|
1063
1069
|
return next.handle(req);
|
|
1064
1070
|
}
|
|
1065
1071
|
}
|
|
1066
|
-
JwtInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1067
|
-
JwtInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1068
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1072
|
+
JwtInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: JwtInterceptor, deps: [{ token: JwtService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1073
|
+
JwtInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: JwtInterceptor });
|
|
1074
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: JwtInterceptor, decorators: [{
|
|
1069
1075
|
type: Injectable
|
|
1070
1076
|
}], ctorParameters: function () { return [{ type: JwtService }]; } });
|
|
1071
1077
|
|
|
@@ -1103,9 +1109,9 @@ class JwtRefreshTokenInterceptor {
|
|
|
1103
1109
|
return this.refreshTokenRequest$;
|
|
1104
1110
|
}
|
|
1105
1111
|
}
|
|
1106
|
-
JwtRefreshTokenInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1107
|
-
JwtRefreshTokenInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1112
|
+
JwtRefreshTokenInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: JwtRefreshTokenInterceptor, deps: [{ token: JwtService }, { token: i2$1.HttpClient }, { token: DDR_JWT_REFRESH_TOKEN_URL }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1113
|
+
JwtRefreshTokenInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: JwtRefreshTokenInterceptor });
|
|
1114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: JwtRefreshTokenInterceptor, decorators: [{
|
|
1109
1115
|
type: Injectable
|
|
1110
1116
|
}], ctorParameters: function () {
|
|
1111
1117
|
return [{ type: JwtService }, { type: i2$1.HttpClient }, { type: undefined, decorators: [{
|