@rxap/oauth 12.0.9-next.1 → 12.0.10
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/bundles/rxap-oauth-single-sign-on.umd.js +36 -32
- package/bundles/rxap-oauth-single-sign-on.umd.js.map +1 -1
- package/bundles/rxap-oauth.umd.js +51 -53
- package/bundles/rxap-oauth.umd.js.map +1 -1
- package/esm2015/lib/container/container.component.js +3 -3
- package/esm2015/lib/container/container.component.js.map +1 -1
- package/esm2015/lib/container/container.component.module.js +4 -4
- package/esm2015/lib/container/container.component.module.js.map +1 -1
- package/esm2015/lib/get-o-auth-profile.method.js +3 -3
- package/esm2015/lib/get-o-auth-profile.method.js.map +1 -1
- package/esm2015/lib/loading/loading.component.js +3 -3
- package/esm2015/lib/loading/loading.component.js.map +1 -1
- package/esm2015/lib/loading/loading.component.module.js +4 -4
- package/esm2015/lib/loading/loading.component.module.js.map +1 -1
- package/esm2015/lib/o-auth-extract.guard.js +3 -3
- package/esm2015/lib/o-auth-extract.guard.js.map +1 -1
- package/esm2015/lib/o-auth-redirect.guard.js +3 -3
- package/esm2015/lib/o-auth-redirect.guard.js.map +1 -1
- package/esm2015/lib/o-auth-routing.module.js +4 -4
- package/esm2015/lib/o-auth-routing.module.js.map +1 -1
- package/esm2015/lib/o-auth.method.js +3 -3
- package/esm2015/lib/o-auth.method.js.map +1 -1
- package/esm2015/lib/o-auth.module.js +4 -4
- package/esm2015/lib/o-auth.module.js.map +1 -1
- package/esm2015/lib/o-auth.service.js +3 -3
- package/esm2015/lib/o-auth.service.js.map +1 -1
- package/esm2015/lib/profile.resolve.js +3 -3
- package/esm2015/lib/profile.resolve.js.map +1 -1
- package/esm2015/lib/sign-in-with-redirect/sign-in-with-redirect.component.js +3 -3
- package/esm2015/lib/sign-in-with-redirect/sign-in-with-redirect.component.js.map +1 -1
- package/esm2015/lib/sign-in-with-redirect/sign-in-with-redirect.component.module.js +4 -4
- package/esm2015/lib/sign-in-with-redirect/sign-in-with-redirect.component.module.js.map +1 -1
- package/esm2015/single-sign-on/lib/continue/continue.component.js +3 -3
- package/esm2015/single-sign-on/lib/continue/continue.component.js.map +1 -1
- package/esm2015/single-sign-on/lib/continue/continue.component.module.js +4 -4
- package/esm2015/single-sign-on/lib/continue/continue.component.module.js.map +1 -1
- package/esm2015/single-sign-on/lib/error/error.component.js +10 -4
- package/esm2015/single-sign-on/lib/error/error.component.js.map +1 -1
- package/esm2015/single-sign-on/lib/error/error.component.module.js +4 -4
- package/esm2015/single-sign-on/lib/error/error.component.module.js.map +1 -1
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on-routing.module.js +4 -4
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on-routing.module.js.map +1 -1
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on.guard.js +3 -3
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on.guard.js.map +1 -1
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on.service.js +3 -3
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on.service.js.map +1 -1
- package/fesm2015/rxap-oauth-single-sign-on.js +31 -25
- package/fesm2015/rxap-oauth-single-sign-on.js.map +1 -1
- package/fesm2015/rxap-oauth.js +47 -47
- package/fesm2015/rxap-oauth.js.map +1 -1
- package/package.json +5 -5
- package/single-sign-on/lib/error/error.component.d.ts +1 -1
- package/src/schematics/ng-add/index.js +1 -1
- package/src/schematics/ng-add/index.js.map +1 -1
package/fesm2015/rxap-oauth.js
CHANGED
|
@@ -39,9 +39,9 @@ class GetOAuthProfileMethod {
|
|
|
39
39
|
.toPromise();
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
GetOAuthProfileMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
43
|
-
GetOAuthProfileMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
42
|
+
GetOAuthProfileMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GetOAuthProfileMethod, deps: [{ token: HttpClient }, { token: PROFILE_AUTH_ENDPOINT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
43
|
+
GetOAuthProfileMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GetOAuthProfileMethod, providedIn: 'root' });
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GetOAuthProfileMethod, decorators: [{
|
|
45
45
|
type: Injectable,
|
|
46
46
|
args: [{ providedIn: 'root' }]
|
|
47
47
|
}], ctorParameters: function () { return [{ type: i1.HttpClient, decorators: [{
|
|
@@ -154,9 +154,9 @@ class OAuthMethod {
|
|
|
154
154
|
throw new Error('Could not guess the grant type');
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
OAuthMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
158
|
-
OAuthMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
157
|
+
OAuthMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthMethod, deps: [{ token: HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
158
|
+
OAuthMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthMethod, providedIn: 'root' });
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthMethod, decorators: [{
|
|
160
160
|
type: Injectable,
|
|
161
161
|
args: [{ providedIn: 'root' }]
|
|
162
162
|
}], ctorParameters: function () { return [{ type: i1.HttpClient, decorators: [{
|
|
@@ -441,9 +441,9 @@ class OAuthService {
|
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
OAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
445
|
-
OAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.
|
|
446
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
444
|
+
OAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthService, deps: [{ token: OAuthMethod }, { token: GetOAuthProfileMethod }, { token: Router }, { token: PROFILE_AUTH_ENDPOINT, optional: true }, { token: OAUTH_AUTH_ENDPOINT, optional: true }, { token: OAUTH_SECRET, optional: true }, { token: OAUTH_SSO_URL, optional: true }, { token: RXAP_O_AUTH_REDIRECT_SIGN_OUT, optional: true }, { token: RXAP_O_AUTH_REDIRECT_URL, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
445
|
+
OAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthService, providedIn: 'root' });
|
|
446
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthService, decorators: [{
|
|
447
447
|
type: Injectable,
|
|
448
448
|
args: [{ providedIn: 'root' }]
|
|
449
449
|
}], ctorParameters: function () { return [{ type: OAuthMethod, decorators: [{
|
|
@@ -529,9 +529,9 @@ class OAuthExtractGuard {
|
|
|
529
529
|
return this.router.createUrlTree([...route.url.map(url => url.path), 'redirect']);
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
-
OAuthExtractGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
533
|
-
OAuthExtractGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.
|
|
534
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
532
|
+
OAuthExtractGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthExtractGuard, deps: [{ token: i1$1.Router }, { token: OAuthService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
533
|
+
OAuthExtractGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthExtractGuard, providedIn: 'root' });
|
|
534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthExtractGuard, decorators: [{
|
|
535
535
|
type: Injectable,
|
|
536
536
|
args: [{ providedIn: 'root' }]
|
|
537
537
|
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: OAuthService }]; } });
|
|
@@ -555,9 +555,9 @@ class OAuthRedirectGuard {
|
|
|
555
555
|
return this.canActivate(childRoute, state);
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
OAuthRedirectGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
559
|
-
OAuthRedirectGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.
|
|
560
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
558
|
+
OAuthRedirectGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthRedirectGuard, deps: [{ token: OAuthService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
559
|
+
OAuthRedirectGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthRedirectGuard, providedIn: 'root' });
|
|
560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthRedirectGuard, decorators: [{
|
|
561
561
|
type: Injectable,
|
|
562
562
|
args: [{ providedIn: 'root' }]
|
|
563
563
|
}], ctorParameters: function () { return [{ type: OAuthService, decorators: [{
|
|
@@ -583,10 +583,10 @@ class OAuthModule {
|
|
|
583
583
|
};
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
OAuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
587
|
-
OAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.
|
|
588
|
-
OAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.
|
|
589
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
586
|
+
OAuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
587
|
+
OAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthModule });
|
|
588
|
+
OAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthModule });
|
|
589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthModule, decorators: [{
|
|
590
590
|
type: NgModule
|
|
591
591
|
}] });
|
|
592
592
|
|
|
@@ -595,8 +595,8 @@ class ContainerComponent {
|
|
|
595
595
|
return outlet.isActivated ? outlet.activatedRoute : 'true';
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
ContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
599
|
-
ContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.
|
|
598
|
+
ContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
599
|
+
ContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContainerComponent, selector: "rxap-container", host: { classAttribute: "rxap-container" }, ngImport: i0, template: "<div [@routeAnimations]=\"prepareRoute(outlet)\" class=\"container\">\n\n <div class=\"split mat-elevation-z3\"></div>\n\n <router-outlet #outlet=\"outlet\"></router-outlet>\n\n</div>\n", styles: [".container{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center}.container .split{position:absolute;top:0;left:0;right:0;bottom:65vh;z-index:-10}"], directives: [{ type: i1$1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }], animations: [
|
|
600
600
|
trigger('routeAnimations', [
|
|
601
601
|
transition(':enter', [
|
|
602
602
|
style({ opacity: 0 }),
|
|
@@ -608,7 +608,7 @@ ContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
608
608
|
])
|
|
609
609
|
])
|
|
610
610
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
611
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
611
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContainerComponent, decorators: [{
|
|
612
612
|
type: Component,
|
|
613
613
|
args: [{
|
|
614
614
|
selector: 'rxap-container',
|
|
@@ -633,9 +633,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
633
633
|
|
|
634
634
|
class LoadingComponent {
|
|
635
635
|
}
|
|
636
|
-
LoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
637
|
-
LoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.
|
|
638
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
636
|
+
LoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
637
|
+
LoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: LoadingComponent, selector: "rxap-loading", host: { classAttribute: "rxap-loading" }, ngImport: i0, template: "<mat-progress-bar class=\"loading-bar\" mode=\"indeterminate\"></mat-progress-bar>\n", styles: [""], components: [{ type: i1$2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "mode", "value", "bufferValue"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
638
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LoadingComponent, decorators: [{
|
|
639
639
|
type: Component,
|
|
640
640
|
args: [{
|
|
641
641
|
selector: 'rxap-loading',
|
|
@@ -654,8 +654,8 @@ class SignInWithRedirectComponent {
|
|
|
654
654
|
this.authService.signInWithRedirect();
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
|
-
SignInWithRedirectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
658
|
-
SignInWithRedirectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.
|
|
657
|
+
SignInWithRedirectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SignInWithRedirectComponent, deps: [{ token: OAuthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
658
|
+
SignInWithRedirectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SignInWithRedirectComponent, selector: "rxap-sign-in-with-redirect", host: { classAttribute: "rxap-sign-in-with-redirect" }, ngImport: i0, template: "<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"32px\">\n\n <div class=\"header\" fxFlex=\"nogrow\" fxLayout=\"column\" fxLayoutAlign=\"center center\">\n\n <mat-icon class=\"avatar-icon\" color=\"primary\" fxFlex=\"nogrow\">account_circle</mat-icon>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"signIn()\" color=\"primary\" fxFlex=\"nogrow\" mat-raised-button>\n <span fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"16px\">\n <mat-icon fxFlex=\"nogrow\">login</mat-icon>\n <span fxFlex=\"nogrow\">Sign In</span>\n </span>\n </button>\n </div>\n\n </div>\n\n</div>\n\n", styles: [".inner{padding:64px;position:relative}.inner .header .avatar-icon{width:100px;height:100px;font-size:100px}"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i4.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i4.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i4.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }], animations: [
|
|
659
659
|
trigger('fadeAnimation', [
|
|
660
660
|
// the "in" style determines the "resting" state of the element when it is visible.
|
|
661
661
|
state('in', style({ opacity: 1 })),
|
|
@@ -668,7 +668,7 @@ SignInWithRedirectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
668
668
|
transition(':leave', animate(300, style({ opacity: 0 })))
|
|
669
669
|
])
|
|
670
670
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
671
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
671
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SignInWithRedirectComponent, decorators: [{
|
|
672
672
|
type: Component,
|
|
673
673
|
args: [{
|
|
674
674
|
selector: 'rxap-sign-in-with-redirect',
|
|
@@ -730,9 +730,9 @@ class ProfileResolve {
|
|
|
730
730
|
});
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
|
-
ProfileResolve.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
734
|
-
ProfileResolve.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.
|
|
735
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
733
|
+
ProfileResolve.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProfileResolve, deps: [{ token: OAuthService }, { token: Router }, { token: RXAP_O_AUTH_REDIRECT_SIGN_IN }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
734
|
+
ProfileResolve.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProfileResolve, providedIn: 'root' });
|
|
735
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProfileResolve, decorators: [{
|
|
736
736
|
type: Injectable,
|
|
737
737
|
args: [{ providedIn: 'root' }]
|
|
738
738
|
}], ctorParameters: function () { return [{ type: OAuthService, decorators: [{
|
|
@@ -748,12 +748,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
748
748
|
|
|
749
749
|
class ContainerComponentModule {
|
|
750
750
|
}
|
|
751
|
-
ContainerComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
752
|
-
ContainerComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.
|
|
753
|
-
ContainerComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.
|
|
751
|
+
ContainerComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContainerComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
752
|
+
ContainerComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContainerComponentModule, declarations: [ContainerComponent], imports: [RouterModule], exports: [ContainerComponent] });
|
|
753
|
+
ContainerComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContainerComponentModule, imports: [[
|
|
754
754
|
RouterModule
|
|
755
755
|
]] });
|
|
756
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
756
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContainerComponentModule, decorators: [{
|
|
757
757
|
type: NgModule,
|
|
758
758
|
args: [{
|
|
759
759
|
declarations: [ContainerComponent],
|
|
@@ -766,12 +766,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
766
766
|
|
|
767
767
|
class LoadingComponentModule {
|
|
768
768
|
}
|
|
769
|
-
LoadingComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
770
|
-
LoadingComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.
|
|
771
|
-
LoadingComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.
|
|
769
|
+
LoadingComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LoadingComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
770
|
+
LoadingComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LoadingComponentModule, declarations: [LoadingComponent], imports: [MatProgressBarModule], exports: [LoadingComponent] });
|
|
771
|
+
LoadingComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LoadingComponentModule, imports: [[
|
|
772
772
|
MatProgressBarModule
|
|
773
773
|
]] });
|
|
774
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
774
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LoadingComponentModule, decorators: [{
|
|
775
775
|
type: NgModule,
|
|
776
776
|
args: [{
|
|
777
777
|
declarations: [
|
|
@@ -788,20 +788,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
788
788
|
|
|
789
789
|
class SignInWithRedirectComponentModule {
|
|
790
790
|
}
|
|
791
|
-
SignInWithRedirectComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
792
|
-
SignInWithRedirectComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.
|
|
791
|
+
SignInWithRedirectComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SignInWithRedirectComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
792
|
+
SignInWithRedirectComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SignInWithRedirectComponentModule, declarations: [SignInWithRedirectComponent], imports: [MatCardModule,
|
|
793
793
|
MatButtonModule,
|
|
794
794
|
FlexLayoutModule,
|
|
795
795
|
MatIconModule,
|
|
796
796
|
CommonModule], exports: [SignInWithRedirectComponent] });
|
|
797
|
-
SignInWithRedirectComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.
|
|
797
|
+
SignInWithRedirectComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SignInWithRedirectComponentModule, imports: [[
|
|
798
798
|
MatCardModule,
|
|
799
799
|
MatButtonModule,
|
|
800
800
|
FlexLayoutModule,
|
|
801
801
|
MatIconModule,
|
|
802
802
|
CommonModule
|
|
803
803
|
]] });
|
|
804
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
804
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SignInWithRedirectComponentModule, decorators: [{
|
|
805
805
|
type: NgModule,
|
|
806
806
|
args: [{
|
|
807
807
|
declarations: [SignInWithRedirectComponent],
|
|
@@ -818,14 +818,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
818
818
|
|
|
819
819
|
class OAuthRoutingModule {
|
|
820
820
|
}
|
|
821
|
-
OAuthRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
822
|
-
OAuthRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.
|
|
821
|
+
OAuthRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
822
|
+
OAuthRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthRoutingModule, exports: [ContainerComponentModule,
|
|
823
823
|
LoadingComponentModule,
|
|
824
824
|
SignInWithRedirectComponentModule] });
|
|
825
|
-
OAuthRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.
|
|
825
|
+
OAuthRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthRoutingModule, imports: [ContainerComponentModule,
|
|
826
826
|
LoadingComponentModule,
|
|
827
827
|
SignInWithRedirectComponentModule] });
|
|
828
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthRoutingModule, decorators: [{
|
|
829
829
|
type: NgModule,
|
|
830
830
|
args: [{
|
|
831
831
|
exports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-oauth.js","sources":["../../../../libs/oauth/src/lib/get-o-auth-profile.method.ts","../../../../libs/oauth/src/lib/o-auth.method.ts","../../../../libs/oauth/src/lib/tokens.ts","../../../../libs/oauth/src/lib/o-auth.service.ts","../../../../libs/oauth/src/lib/o-auth-extract.guard.ts","../../../../libs/oauth/src/lib/o-auth-redirect.guard.ts","../../../../libs/oauth/src/lib/o-auth.module.ts","../../../../libs/oauth/src/lib/container/container.component.ts","../../../../libs/oauth/src/lib/container/container.component.html","../../../../libs/oauth/src/lib/loading/loading.component.ts","../../../../libs/oauth/src/lib/loading/loading.component.html","../../../../libs/oauth/src/lib/sign-in-with-redirect/sign-in-with-redirect.component.ts","../../../../libs/oauth/src/lib/sign-in-with-redirect/sign-in-with-redirect.component.html","../../../../libs/oauth/src/lib/routes.ts","../../../../libs/oauth/src/lib/profile.resolve.ts","../../../../libs/oauth/src/lib/container/container.component.module.ts","../../../../libs/oauth/src/lib/loading/loading.component.module.ts","../../../../libs/oauth/src/lib/sign-in-with-redirect/sign-in-with-redirect.component.module.ts","../../../../libs/oauth/src/lib/o-auth-routing.module.ts","../../../../libs/oauth/src/rxap-oauth.ts"],"sourcesContent":["import {\n Inject,\n Injectable,\n InjectionToken,\n Optional\n} from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { Method } from '@rxap/utilities/rxjs';\n\nexport const PROFILE_AUTH_ENDPOINT = new InjectionToken(\n 'PROFILE_AUTH_ENDPOINT'\n);\n\nexport interface GetOAuthProfileMethodParameters {\n accessToken: string;\n profileEndpoint?: string | null;\n withCredentials?: boolean;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class GetOAuthProfileMethod<T = any>\n implements Method<T, GetOAuthProfileMethodParameters>\n{\n constructor(\n @Inject(HttpClient)\n private readonly http: HttpClient,\n @Optional()\n @Inject(PROFILE_AUTH_ENDPOINT)\n public profileEndpoint: string | null = null\n ) {}\n\n public call(parameters: GetOAuthProfileMethodParameters): Promise<T> {\n const profileEndpoint = parameters.profileEndpoint ?? this.profileEndpoint;\n\n if (!profileEndpoint) {\n throw new Error('The profile endpoint is not defined');\n }\n\n return this.http\n .get<T>(profileEndpoint, {\n headers: {\n Authorization: `Bearer ${parameters.accessToken}`,\n },\n withCredentials: parameters.withCredentials ?? true,\n })\n .toPromise();\n }\n}\n","import {\n Injectable,\n Inject\n} from '@angular/core';\nimport {\n HttpClient,\n HttpHeaders\n} from '@angular/common/http';\nimport { Method } from '@rxap/utilities/rxjs';\n\nexport interface OAuthMethodWithUsernamePasswordParameters {\n grantType?: string;\n username: string;\n password: string;\n secret: string;\n authEndpoint: string;\n}\n\nexport interface OAuthMethodWithRefreshTokenParameters {\n grantType?: string;\n refreshToken: string;\n secret: string;\n authEndpoint: string;\n}\n\nexport type OAuthMethodParameters = (\n | OAuthMethodWithUsernamePasswordParameters\n | OAuthMethodWithRefreshTokenParameters\n) & { withCredentials?: boolean };\n\nexport function IsOAuthMethodWithRefreshTokenParameters(\n parameters: OAuthMethodParameters\n): parameters is OAuthMethodWithRefreshTokenParameters {\n // eslint-disable-next-line no-prototype-builtins\n return parameters.hasOwnProperty('refreshToken');\n}\n\nexport function IsOAuthMethodWithUsernamePasswordParameters(\n parameters: OAuthMethodParameters\n): parameters is OAuthMethodWithUsernamePasswordParameters {\n // eslint-disable-next-line no-prototype-builtins\n return (\n parameters.hasOwnProperty('username') &&\n parameters.hasOwnProperty('password')\n );\n}\n\nexport function AssertOAuthMethodWithUsernamePasswordParameters(\n parameters: OAuthMethodParameters\n): asserts parameters is OAuthMethodWithUsernamePasswordParameters {\n if (!IsOAuthMethodWithUsernamePasswordParameters(parameters)) {\n throw new Error(\n 'The grant type password requires the parameters username and password'\n );\n }\n}\n\nexport function AssertOAuthMethodWithRefreshTokenParameters(\n parameters: OAuthMethodParameters\n): asserts parameters is OAuthMethodWithRefreshTokenParameters {\n if (!IsOAuthMethodWithRefreshTokenParameters(parameters)) {\n throw new Error(\n 'The grant type refresh token requires the parameters refreshToken'\n );\n }\n}\n\nexport function AssertOAuthMethodParameters(\n parameters: any\n): asserts parameters is OAuthMethodParameters {\n if (!parameters.authEndpoint) {\n throw new Error('The authEndpoint parameter must be defined');\n }\n if (!parameters.secret) {\n throw new Error('The secret parameter must be defined');\n }\n if (parameters.grantType) {\n switch (parameters.grantType) {\n case 'password':\n AssertOAuthMethodWithUsernamePasswordParameters(parameters);\n break;\n\n case 'refresh_token':\n AssertOAuthMethodWithRefreshTokenParameters(parameters);\n break;\n\n default:\n throw new Error(\n `The grant type '${parameters.grantType}' is not supported`\n );\n }\n } else {\n if (\n !IsOAuthMethodWithRefreshTokenParameters(parameters) &&\n !IsOAuthMethodWithUsernamePasswordParameters(parameters)\n ) {\n throw new Error(\n 'Either the refresh token or the username and password must be defined'\n );\n }\n }\n}\n\nexport interface OAuthResponse {\n access_token: string;\n refresh_token: string;\n expires_in: number;\n}\n\nexport interface OAuthMethodResponse {\n accessToken: string;\n refreshToken: string;\n expiresIn: number;\n expiresAt: Date;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class OAuthMethod\n implements Method<OAuthMethodResponse, OAuthMethodParameters>\n{\n constructor(\n @Inject(HttpClient)\n private readonly http: HttpClient\n ) {}\n\n public async call(\n parameters: OAuthMethodParameters\n ): Promise<OAuthMethodResponse> {\n AssertOAuthMethodParameters(parameters);\n\n const params = new URLSearchParams();\n const grantType = this.getGrantType(parameters);\n params.append('grant_type', grantType);\n switch (grantType) {\n case 'password':\n AssertOAuthMethodWithUsernamePasswordParameters(parameters);\n params.append('username', parameters.username);\n params.append('password', parameters.password);\n break;\n\n case 'refresh_token':\n AssertOAuthMethodWithRefreshTokenParameters(parameters);\n params.append('refresh_token', parameters.refreshToken);\n break;\n\n default:\n throw new Error('Not supported grant type');\n }\n\n const headers = new HttpHeaders({\n 'Content-type': 'application/x-www-form-urlencoded; charset=utf-8',\n Authorization: `Basic ${parameters.secret}`,\n });\n\n const response = await this.http\n .post<OAuthResponse>(parameters.authEndpoint, params.toString(), {\n headers,\n withCredentials: parameters.withCredentials ?? true,\n })\n .toPromise();\n\n return {\n accessToken: response.access_token,\n refreshToken: response.refresh_token,\n expiresIn: response.expires_in,\n expiresAt: new Date(Date.now() + response.expires_in * 1000),\n };\n }\n\n private getGrantType(parameters: OAuthMethodParameters) {\n if (parameters.grantType) {\n return parameters.grantType;\n }\n\n if (IsOAuthMethodWithRefreshTokenParameters(parameters)) {\n return 'refresh_token';\n }\n\n if (IsOAuthMethodWithUsernamePasswordParameters(parameters)) {\n return 'password';\n }\n\n throw new Error('Could not guess the grant type');\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport function DefaultRedirectSignInFactory(): string[] {\n return [ '/', 'authentication', 'login' ];\n}\n\nexport const RXAP_O_AUTH_REDIRECT_SIGN_IN = new InjectionToken('rxap/o-auth/redirect-sign-in', {\n providedIn: 'root',\n factory: DefaultRedirectSignInFactory\n});\n\nexport const RXAP_O_AUTH_REDIRECT_SIGN_OUT = new InjectionToken('rxap/o-auth/redirect-sign-out');\n\nexport function DefaultRedirectUrl(): string {\n return location.origin + '/oauth';\n}\n\nexport const RXAP_O_AUTH_REDIRECT_URL = new InjectionToken('rxap/o-auth/redirect-url', {\n providedIn: 'root',\n factory: DefaultRedirectUrl\n});\n","import {\n Inject,\n Injectable,\n InjectionToken,\n Optional\n} from '@angular/core';\nimport {\n GetOAuthProfileMethod,\n PROFILE_AUTH_ENDPOINT\n} from './get-o-auth-profile.method';\nimport {\n OAuthMethod,\n OAuthMethodResponse\n} from './o-auth.method';\nimport {\n RXAP_O_AUTH_REDIRECT_SIGN_OUT,\n RXAP_O_AUTH_REDIRECT_URL\n} from './tokens';\nimport { Router } from '@angular/router';\n\nexport const OAUTH_SECRET = new InjectionToken('OAUTH_SECRET');\nexport const OAUTH_AUTH_ENDPOINT = new InjectionToken('OAUTH_AUTH_ENDPOINT');\nexport const OAUTH_SSO_URL = new InjectionToken('OAUTH_SSO_URL');\n\nexport const ACCESS_TOKEN_LOCAL_STORAGE_KEY = 'access_token';\nexport const REFRESH_TOKEN_LOCAL_STORAGE_KEY = 'refresh_token';\nexport const EXPIRES_AT_LOCAL_STORAGE_KEY = 'expires_at';\nexport const REMEMBER_LOCAL_STORAGE_KEY = 'remember';\n\nexport interface OAuthStatus {\n accessToken: string;\n refreshToken?: string | null;\n expiresIn: number;\n expiresAt: Date;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class OAuthService<Profile = any> {\n get expiresAt(): Date | null {\n const expiresAt = this.getItem(EXPIRES_AT_LOCAL_STORAGE_KEY);\n if (expiresAt) {\n return new Date(\n parseInt(this.getItem(EXPIRES_AT_LOCAL_STORAGE_KEY)!, 10)\n );\n }\n return null;\n }\n\n set expiresAt(value: Date | null) {\n if (value) {\n this.setItem(EXPIRES_AT_LOCAL_STORAGE_KEY, value.getTime().toFixed(0));\n } else {\n this.removeItem(EXPIRES_AT_LOCAL_STORAGE_KEY);\n }\n }\n\n get refreshToken(): string | null {\n return this.getItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY);\n }\n\n set refreshToken(value: string | null) {\n if (value) {\n this.setItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY, value);\n } else {\n this.removeItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY);\n }\n }\n\n get accessToken(): string | null {\n return this.getItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY);\n }\n\n set accessToken(value: string | null) {\n if (value) {\n this.setItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY, value);\n } else {\n this.removeItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY);\n }\n }\n\n /**\n * The time until the access token expires in seconds\n */\n public get expiresIn(): number | null {\n const expiresAt = this.expiresAt;\n if (expiresAt) {\n return Math.round(\n (expiresAt.getTime() - Date.now()) / 1000\n );\n }\n return null;\n }\n\n public get remember(): boolean {\n return !!this.getItem(REMEMBER_LOCAL_STORAGE_KEY);\n }\n\n public set remember(value: boolean) {\n if (value) {\n this.setItem(REMEMBER_LOCAL_STORAGE_KEY, 'true');\n } else {\n this.removeItem(REMEMBER_LOCAL_STORAGE_KEY);\n }\n }\n\n private _profile?: Profile | null;\n\n protected _isAuthenticated: boolean | null = null;\n\n public get profile(): Profile | null | undefined {\n return this._profile;\n }\n\n constructor(\n @Inject(OAuthMethod)\n public readonly oAuthMethod: OAuthMethod,\n @Inject(GetOAuthProfileMethod)\n public readonly getOAuthProfileMethod: GetOAuthProfileMethod,\n @Inject(Router)\n private readonly router: Router,\n @Optional()\n @Inject(PROFILE_AUTH_ENDPOINT)\n public profileEndpoint: string | null = null,\n @Optional()\n @Inject(OAUTH_AUTH_ENDPOINT)\n public authEndpoint: string | null = null,\n @Optional()\n @Inject(OAUTH_SECRET)\n public secret: string | null = null,\n @Optional()\n @Inject(OAUTH_SSO_URL)\n private readonly ssoUrl: string | null = null,\n @Optional()\n @Inject(RXAP_O_AUTH_REDIRECT_SIGN_OUT)\n private readonly redirectSignOut: string[] | null = null,\n @Optional()\n @Inject(RXAP_O_AUTH_REDIRECT_URL)\n private readonly redirectUrl: string | null = null\n ) {}\n\n public signInWithRedirect(lastUrl?: string): void {\n if (!this.redirectUrl) {\n throw new Error('Redirect url is not defined');\n }\n location.replace(\n `${this.ssoUrl}?redirect=${btoa(this.redirectUrl)}&secret=${\n this.secret\n }&payload=${btoa(JSON.stringify({ lastUrl }))}`\n );\n }\n\n public async isAuthenticated(): Promise<boolean> {\n if (!this.secret) {\n throw new Error('The oauth secret is not defined');\n }\n\n if (!this.authEndpoint) {\n throw new Error('The oauth auth endpoint is not defined');\n }\n\n if (this._isAuthenticated !== null) {\n return this._isAuthenticated;\n }\n\n if (this.accessToken) {\n console.debug('Access token is defined: ' + this.accessToken);\n if (this.expiresIn && this.expiresIn > 60) {\n const profile = await this.getProfile();\n\n if (!profile) {\n console.log('profile is not defined');\n return (this._isAuthenticated = false);\n }\n\n this.authenticated(\n {\n refreshToken: this.refreshToken,\n accessToken: this.accessToken,\n expiresAt: this.expiresAt ?? new Date(Date.now() + 60 * 1000),\n expiresIn: this.expiresIn,\n },\n this.remember\n );\n\n return (this._isAuthenticated = true);\n } else {\n this.accessToken = null;\n this.expiresAt = null;\n console.warn(\n 'The access token expires soon. Use refresh token instead.'\n );\n }\n }\n if (this.refreshToken) {\n console.debug('Refresh token is defined: ' + this.refreshToken);\n try {\n await this.signInWithRefreshToken(this.refreshToken);\n return (this._isAuthenticated = true);\n } catch (e) {\n if (![401, 403, 400].includes(e.status)) {\n console.error('Could not sign in with refresh token', e.message);\n throw e;\n }\n console.warn('Refresh token is expired');\n }\n }\n\n console.warn('Unauthenticated');\n\n return (this._isAuthenticated = false);\n }\n\n public async signInWithEmailAndPassword(\n email: string,\n password: string,\n remember: boolean\n ): Promise<OAuthMethodResponse> {\n if (!this.secret) {\n throw new Error('The oauth secret is not defined');\n }\n\n if (!this.authEndpoint) {\n throw new Error('The oauth auth endpoint is not defined');\n }\n\n const response = await this.oAuthMethod.call({\n username: email,\n password: password,\n authEndpoint: this.authEndpoint,\n secret: this.secret,\n });\n\n this.authenticated(response, remember);\n\n return response;\n }\n\n public async getProfile<T extends Profile = Profile>(): Promise<T | null> {\n let profile: T | null = null;\n\n if (!this.accessToken) {\n throw new Error('The access token is not defined');\n }\n\n if (this.profileEndpoint) {\n try {\n profile = await this.getOAuthProfileMethod.call({\n accessToken: this.accessToken,\n profileEndpoint: this.profileEndpoint,\n });\n } catch (e) {\n console.error('Could not request the user profile', e.message);\n }\n } else {\n console.warn('The profile endpoint is not defined!');\n }\n\n return (this._profile = profile);\n }\n\n public async signOut() {\n this.clearStorage();\n this.accessToken = null;\n this.refreshToken = null;\n this.expiresAt = null;\n this._isAuthenticated = false;\n if (this.redirectSignOut) {\n await this.router.navigate(this.redirectSignOut);\n } else {\n if (!this.redirectUrl) {\n throw new Error('Redirect url is not defined');\n }\n location.replace(\n `${this.ssoUrl}?redirect=${btoa(this.redirectUrl)}&secret=${this.secret}&action=signOut`\n );\n }\n }\n\n public authenticated(\n response: OAuthStatus,\n remember: boolean = this.remember ?? false\n ): void {\n this.accessToken = response.accessToken;\n this.refreshToken = response.refreshToken ?? null;\n this.expiresAt = response.expiresAt;\n\n console.log(`Authenticated until ${this.expiresAt.toISOString()}`);\n\n this.remember = remember;\n\n if (remember) {\n this.setItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY, response.accessToken);\n if (response.refreshToken) {\n this.setItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY, response.refreshToken);\n }\n this.setItem(REMEMBER_LOCAL_STORAGE_KEY, 'true');\n if (response.expiresAt) {\n console.log(`Authenticated until ${response.expiresAt.toISOString()}`);\n this.setItem(\n EXPIRES_AT_LOCAL_STORAGE_KEY,\n response.expiresAt.getTime().toFixed(0)\n );\n }\n } else {\n this.removeItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY);\n this.removeItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY);\n this.removeItem(REMEMBER_LOCAL_STORAGE_KEY);\n this.removeItem(EXPIRES_AT_LOCAL_STORAGE_KEY);\n }\n\n this._isAuthenticated = true;\n }\n\n private getKey(key: string): string {\n return [this.secret, key].join('__');\n }\n\n private getItem(key: string): string | null {\n return localStorage.getItem(this.getKey(key));\n }\n\n private setItem(key: string, value: string): void {\n localStorage.setItem(this.getKey(key), value);\n }\n\n private removeItem(key: string): void {\n localStorage.removeItem(this.getKey(key));\n }\n\n protected clearStorage() {\n this.removeItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY);\n this.removeItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY);\n this.removeItem(REMEMBER_LOCAL_STORAGE_KEY);\n this.removeItem(EXPIRES_AT_LOCAL_STORAGE_KEY);\n }\n\n private async signInWithRefreshToken(\n refreshToken: string\n ): Promise<OAuthMethodResponse> {\n if (!this.secret) {\n throw new Error('The oauth secret is not defined');\n }\n\n if (!this.authEndpoint) {\n throw new Error('The oauth auth endpoint is not defined');\n }\n\n const response = await this.oAuthMethod.call({\n refreshToken,\n authEndpoint: this.authEndpoint,\n secret: this.secret,\n });\n\n this.authenticated(response);\n\n return response;\n }\n}\n","import {\n ActivatedRouteSnapshot,\n CanActivate,\n UrlTree,\n Router\n} from '@angular/router';\nimport { Injectable } from '@angular/core';\nimport { OAuthService } from './o-auth.service';\n\n@Injectable({ providedIn: 'root' })\nexport class OAuthExtractGuard implements CanActivate {\n\n constructor(\n private readonly router: Router,\n private readonly oAuthService: OAuthService\n ) {}\n\n public canActivate(route: ActivatedRouteSnapshot): UrlTree {\n\n if (route.queryParamMap.has('accessToken') && route.queryParamMap.has('refreshToken') && route.queryParamMap.has('expiresIn')) {\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const accessToken = route.queryParamMap.get('accessToken')!;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const refreshToken = route.queryParamMap.get('refreshToken')!;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const expiresIn = parseInt(route.queryParamMap.get('expiresIn')!, 10);\n const payloadBase64 = route.queryParamMap.get('payload');\n\n const expiresAt = new Date(Date.now() + expiresIn * 1000);\n\n this.oAuthService.authenticated({\n accessToken,\n refreshToken,\n expiresIn,\n expiresAt\n }, true);\n\n let redirectUrl = '/';\n\n if (payloadBase64) {\n try {\n const payload = JSON.parse(atob(payloadBase64));\n console.debug('sso redirect payload', payload);\n if (payload.lastUrl) {\n redirectUrl = payload.lastUrl;\n }\n } catch (e) {\n console.error('Could not parse redirect payload', e.message);\n }\n }\n\n return this.router.createUrlTree([ redirectUrl ]);\n\n } else {\n console.warn('Not every query parameter is defined!');\n }\n\n return this.router.createUrlTree([ ...route.url.map(url => url.path), 'redirect' ]);\n }\n\n\n}\n","import {\n ActivatedRouteSnapshot,\n CanActivate,\n CanActivateChild,\n RouterStateSnapshot,\n UrlTree\n} from '@angular/router';\nimport {\n Injectable,\n Inject\n} from '@angular/core';\nimport { OAuthService } from './o-auth.service';\n\n@Injectable({ providedIn: 'root' })\nexport class OAuthRedirectGuard implements CanActivate, CanActivateChild {\n\n constructor(\n @Inject(OAuthService)\n private readonly oAuthService: OAuthService\n ) {\n }\n\n public async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean | UrlTree> {\n\n const isAuthenticated = await this.oAuthService.isAuthenticated();\n\n console.log(`isAuthenticated: ${isAuthenticated}`);\n\n if (isAuthenticated) {\n return true;\n }\n\n this.oAuthService.signInWithRedirect(state.url);\n\n return false;\n\n }\n\n public canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean | UrlTree> {\n return this.canActivate(childRoute, state);\n }\n\n}\n","import {\n NgModule,\n ModuleWithProviders\n} from '@angular/core';\nimport {\n RXAP_O_AUTH_REDIRECT_SIGN_IN,\n RXAP_O_AUTH_REDIRECT_SIGN_OUT\n} from './tokens';\n\nexport interface OAuthModuleOptions {\n signInPath?: string[]\n signOutPath?: string[]\n}\n\n@NgModule()\nexport class OAuthModule {\n\n public static forRoot(options: OAuthModuleOptions = {}): ModuleWithProviders<OAuthModule> {\n return {\n ngModule: OAuthModule,\n providers: [\n {\n provide: RXAP_O_AUTH_REDIRECT_SIGN_IN,\n useValue: options.signInPath ?? [ '/', 'oauth', 'redirect' ]\n },\n {\n provide: RXAP_O_AUTH_REDIRECT_SIGN_OUT,\n useValue: options.signOutPath ?? null\n }\n ]\n };\n }\n\n}\n","import {\n Component,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\nimport {\n trigger,\n transition,\n style,\n animate\n} from '@angular/animations';\n\n@Component({\n selector: 'rxap-container',\n templateUrl: './container.component.html',\n styleUrls: [ './container.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'rxap-container' },\n animations: [\n trigger('routeAnimations', [\n transition(\n ':enter',\n [\n style({ opacity: 0 }),\n animate('512ms', style({ opacity: 1 }))\n ]\n ),\n transition(\n ':leave',\n [\n style({ opacity: 1 }),\n animate('512ms', style({ opacity: 0 }))\n ]\n )\n ])\n ]\n})\nexport class ContainerComponent {\n\n public prepareRoute(outlet: RouterOutlet) {\n return outlet.isActivated ? outlet.activatedRoute : 'true';\n }\n\n}\n","<div [@routeAnimations]=\"prepareRoute(outlet)\" class=\"container\">\n\n <div class=\"split mat-elevation-z3\"></div>\n\n <router-outlet #outlet=\"outlet\"></router-outlet>\n\n</div>\n","import {\n ChangeDetectionStrategy,\n Component\n} from '@angular/core';\n\n@Component({\n selector: 'rxap-loading',\n templateUrl: './loading.component.html',\n styleUrls: [ './loading.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'rxap-loading' }\n})\nexport class LoadingComponent {\n}\n","<mat-progress-bar class=\"loading-bar\" mode=\"indeterminate\"></mat-progress-bar>\n","import {\n Component,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { OAuthService } from '../o-auth.service';\nimport {\n trigger,\n state,\n style,\n transition,\n animate\n} from '@angular/animations';\n\n@Component({\n selector: 'rxap-sign-in-with-redirect',\n templateUrl: './sign-in-with-redirect.component.html',\n styleUrls: [ './sign-in-with-redirect.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'rxap-sign-in-with-redirect' },\n animations: [\n trigger('fadeAnimation', [\n\n // the \"in\" style determines the \"resting\" state of the element when it is visible.\n state('in', style({ opacity: 1 })),\n\n // fade in when created. this could also be written as transition('void => *')\n transition(':enter', [\n style({ opacity: 0 }),\n animate(300)\n ]),\n\n // fade out when destroyed. this could also be written as transition('void => *')\n transition(\n ':leave',\n animate(300, style({ opacity: 0 }))\n )\n ])\n ]\n})\nexport class SignInWithRedirectComponent {\n\n constructor(\n private readonly authService: OAuthService\n ) {}\n\n public signIn() {\n this.authService.signInWithRedirect();\n }\n\n}\n","<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"32px\">\n\n <div class=\"header\" fxFlex=\"nogrow\" fxLayout=\"column\" fxLayoutAlign=\"center center\">\n\n <mat-icon class=\"avatar-icon\" color=\"primary\" fxFlex=\"nogrow\">account_circle</mat-icon>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"signIn()\" color=\"primary\" fxFlex=\"nogrow\" mat-raised-button>\n <span fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"16px\">\n <mat-icon fxFlex=\"nogrow\">login</mat-icon>\n <span fxFlex=\"nogrow\">Sign In</span>\n </span>\n </button>\n </div>\n\n </div>\n\n</div>\n\n","import { Routes } from '@angular/router';\nimport {\n ContainerComponent\n} from './container/container.component';\nimport { LoadingComponent } from './loading/loading.component';\nimport { SignInWithRedirectComponent } from './sign-in-with-redirect/sign-in-with-redirect.component';\nimport { OAuthExtractGuard } from './o-auth-extract.guard';\n\nexport const RXAP_O_AUTH_ROUTES: Routes = [\n {\n path: 'oauth',\n component: ContainerComponent,\n children: [\n {\n path: 'redirect',\n component: SignInWithRedirectComponent\n },\n {\n canActivate: [ OAuthExtractGuard ],\n path: '',\n component: LoadingComponent\n },\n {\n path: '**',\n redirectTo: ''\n }\n ]\n }\n];\n","import {\n Resolve,\n Router\n} from '@angular/router';\nimport {\n Inject,\n Injectable\n} from '@angular/core';\nimport { OAuthService } from './o-auth.service';\nimport { RXAP_O_AUTH_REDIRECT_SIGN_IN } from './tokens';\n\n@Injectable({ providedIn: 'root' })\nexport class ProfileResolve<T = Record<string, any>> implements Resolve<T> {\n\n constructor(\n @Inject(OAuthService)\n private readonly oAuthService: OAuthService,\n @Inject(Router)\n private readonly router: Router,\n @Inject(RXAP_O_AUTH_REDIRECT_SIGN_IN)\n private readonly redirectLogin: string[]\n ) {\n }\n\n public async resolve(): Promise<T> {\n const profile = await this.oAuthService.getProfile();\n\n if (!profile) {\n await this.router.navigate(this.redirectLogin);\n }\n\n return profile;\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { ContainerComponent } from './container.component';\nimport { RouterModule } from '@angular/router';\n\n\n@NgModule({\n declarations: [ ContainerComponent ],\n imports: [\n RouterModule\n ],\n exports: [ ContainerComponent ]\n})\nexport class ContainerComponentModule {}\n","import { NgModule } from '@angular/core';\nimport { LoadingComponent } from './loading.component';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\n\n\n@NgModule({\n declarations: [\n LoadingComponent\n ],\n imports: [\n MatProgressBarModule\n ],\n exports: [\n LoadingComponent\n ]\n})\nexport class LoadingComponentModule {\n}\n","import { NgModule } from '@angular/core';\nimport { SignInWithRedirectComponent } from './sign-in-with-redirect.component';\nimport { MatIconModule } from '@angular/material/icon';\nimport { CommonModule } from '@angular/common';\nimport { MatCardModule } from '@angular/material/card';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MatButtonModule } from '@angular/material/button';\n\n\n@NgModule({\n declarations: [ SignInWithRedirectComponent ],\n imports: [\n MatCardModule,\n MatButtonModule,\n FlexLayoutModule,\n MatIconModule,\n CommonModule\n ],\n exports: [ SignInWithRedirectComponent ]\n})\nexport class SignInWithRedirectComponentModule {}\n","import { NgModule } from '@angular/core';\nimport { ContainerComponentModule } from './container/container.component.module';\nimport { LoadingComponentModule } from './loading/loading.component.module';\nimport {\n SignInWithRedirectComponentModule\n} from './sign-in-with-redirect/sign-in-with-redirect.component.module';\n\n@NgModule({\n exports: [\n ContainerComponentModule,\n LoadingComponentModule,\n SignInWithRedirectComponentModule\n ]\n})\nexport class OAuthRoutingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MASa,qBAAqB,GAAG,IAAI,cAAc,CACrD,uBAAuB,EACvB;MASW,qBAAqB;IAGhC,YAEmB,IAAgB,EAG1B,kBAAiC,IAAI;QAH3B,SAAI,GAAJ,IAAI,CAAY;QAG1B,oBAAe,GAAf,eAAe,CAAsB;KAC1C;IAEG,IAAI,CAAC,UAA2C;;QACrD,MAAM,eAAe,GAAG,MAAA,UAAU,CAAC,eAAe,mCAAI,IAAI,CAAC,eAAe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;YAChB,aAAa;YACb,YAAY;SACb;2FAGU,iCAAiC;kBAX7C,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAE,2BAA2B,CAAE;oBAC7C,OAAO,EAAO;wBACZ,aAAa;wBACb,eAAe;wBACf,gBAAgB;wBAChB,aAAa;wBACb,YAAY;qBACb;oBACD,OAAO,EAAO,CAAE,2BAA2B,CAAE;iBAC9C;;;MCLY,kBAAkB;;+GAAlB,kBAAkB;gHAAlB,kBAAkB,YAL3B,wBAAwB;QACxB,sBAAsB;QACtB,iCAAiC;gHAGxB,kBAAkB,YAL3B,wBAAwB;QACxB,sBAAsB;QACtB,iCAAiC;2FAGxB,kBAAkB;kBAP9B,QAAQ;mBAAC;oBACR,OAAO,EAAE;wBACP,wBAAwB;wBACxB,sBAAsB;wBACtB,iCAAiC;qBAClC;iBACF;;;ACbD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"rxap-oauth.js","sources":["../../../../libs/oauth/src/lib/get-o-auth-profile.method.ts","../../../../libs/oauth/src/lib/o-auth.method.ts","../../../../libs/oauth/src/lib/tokens.ts","../../../../libs/oauth/src/lib/o-auth.service.ts","../../../../libs/oauth/src/lib/o-auth-extract.guard.ts","../../../../libs/oauth/src/lib/o-auth-redirect.guard.ts","../../../../libs/oauth/src/lib/o-auth.module.ts","../../../../libs/oauth/src/lib/container/container.component.ts","../../../../libs/oauth/src/lib/container/container.component.html","../../../../libs/oauth/src/lib/loading/loading.component.ts","../../../../libs/oauth/src/lib/loading/loading.component.html","../../../../libs/oauth/src/lib/sign-in-with-redirect/sign-in-with-redirect.component.ts","../../../../libs/oauth/src/lib/sign-in-with-redirect/sign-in-with-redirect.component.html","../../../../libs/oauth/src/lib/routes.ts","../../../../libs/oauth/src/lib/profile.resolve.ts","../../../../libs/oauth/src/lib/container/container.component.module.ts","../../../../libs/oauth/src/lib/loading/loading.component.module.ts","../../../../libs/oauth/src/lib/sign-in-with-redirect/sign-in-with-redirect.component.module.ts","../../../../libs/oauth/src/lib/o-auth-routing.module.ts","../../../../libs/oauth/src/rxap-oauth.ts"],"sourcesContent":["import {\n Inject,\n Injectable,\n InjectionToken,\n Optional\n} from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { Method } from '@rxap/utilities/rxjs';\n\nexport const PROFILE_AUTH_ENDPOINT = new InjectionToken(\n 'PROFILE_AUTH_ENDPOINT'\n);\n\nexport interface GetOAuthProfileMethodParameters {\n accessToken: string;\n profileEndpoint?: string | null;\n withCredentials?: boolean;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class GetOAuthProfileMethod<T = any>\n implements Method<T, GetOAuthProfileMethodParameters>\n{\n constructor(\n @Inject(HttpClient)\n private readonly http: HttpClient,\n @Optional()\n @Inject(PROFILE_AUTH_ENDPOINT)\n public profileEndpoint: string | null = null\n ) {}\n\n public call(parameters: GetOAuthProfileMethodParameters): Promise<T> {\n const profileEndpoint = parameters.profileEndpoint ?? this.profileEndpoint;\n\n if (!profileEndpoint) {\n throw new Error('The profile endpoint is not defined');\n }\n\n return this.http\n .get<T>(profileEndpoint, {\n headers: {\n Authorization: `Bearer ${parameters.accessToken}`,\n },\n withCredentials: parameters.withCredentials ?? true,\n })\n .toPromise();\n }\n}\n","import {\n Injectable,\n Inject\n} from '@angular/core';\nimport {\n HttpClient,\n HttpHeaders\n} from '@angular/common/http';\nimport { Method } from '@rxap/utilities/rxjs';\n\nexport interface OAuthMethodWithUsernamePasswordParameters {\n grantType?: string;\n username: string;\n password: string;\n secret: string;\n authEndpoint: string;\n}\n\nexport interface OAuthMethodWithRefreshTokenParameters {\n grantType?: string;\n refreshToken: string;\n secret: string;\n authEndpoint: string;\n}\n\nexport type OAuthMethodParameters = (\n | OAuthMethodWithUsernamePasswordParameters\n | OAuthMethodWithRefreshTokenParameters\n) & { withCredentials?: boolean };\n\nexport function IsOAuthMethodWithRefreshTokenParameters(\n parameters: OAuthMethodParameters\n): parameters is OAuthMethodWithRefreshTokenParameters {\n // eslint-disable-next-line no-prototype-builtins\n return parameters.hasOwnProperty('refreshToken');\n}\n\nexport function IsOAuthMethodWithUsernamePasswordParameters(\n parameters: OAuthMethodParameters\n): parameters is OAuthMethodWithUsernamePasswordParameters {\n // eslint-disable-next-line no-prototype-builtins\n return (\n parameters.hasOwnProperty('username') &&\n parameters.hasOwnProperty('password')\n );\n}\n\nexport function AssertOAuthMethodWithUsernamePasswordParameters(\n parameters: OAuthMethodParameters\n): asserts parameters is OAuthMethodWithUsernamePasswordParameters {\n if (!IsOAuthMethodWithUsernamePasswordParameters(parameters)) {\n throw new Error(\n 'The grant type password requires the parameters username and password'\n );\n }\n}\n\nexport function AssertOAuthMethodWithRefreshTokenParameters(\n parameters: OAuthMethodParameters\n): asserts parameters is OAuthMethodWithRefreshTokenParameters {\n if (!IsOAuthMethodWithRefreshTokenParameters(parameters)) {\n throw new Error(\n 'The grant type refresh token requires the parameters refreshToken'\n );\n }\n}\n\nexport function AssertOAuthMethodParameters(\n parameters: any\n): asserts parameters is OAuthMethodParameters {\n if (!parameters.authEndpoint) {\n throw new Error('The authEndpoint parameter must be defined');\n }\n if (!parameters.secret) {\n throw new Error('The secret parameter must be defined');\n }\n if (parameters.grantType) {\n switch (parameters.grantType) {\n case 'password':\n AssertOAuthMethodWithUsernamePasswordParameters(parameters);\n break;\n\n case 'refresh_token':\n AssertOAuthMethodWithRefreshTokenParameters(parameters);\n break;\n\n default:\n throw new Error(\n `The grant type '${parameters.grantType}' is not supported`\n );\n }\n } else {\n if (\n !IsOAuthMethodWithRefreshTokenParameters(parameters) &&\n !IsOAuthMethodWithUsernamePasswordParameters(parameters)\n ) {\n throw new Error(\n 'Either the refresh token or the username and password must be defined'\n );\n }\n }\n}\n\nexport interface OAuthResponse {\n access_token: string;\n refresh_token: string;\n expires_in: number;\n}\n\nexport interface OAuthMethodResponse {\n accessToken: string;\n refreshToken: string;\n expiresIn: number;\n expiresAt: Date;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class OAuthMethod\n implements Method<OAuthMethodResponse, OAuthMethodParameters>\n{\n constructor(\n @Inject(HttpClient)\n private readonly http: HttpClient\n ) {}\n\n public async call(\n parameters: OAuthMethodParameters\n ): Promise<OAuthMethodResponse> {\n AssertOAuthMethodParameters(parameters);\n\n const params = new URLSearchParams();\n const grantType = this.getGrantType(parameters);\n params.append('grant_type', grantType);\n switch (grantType) {\n case 'password':\n AssertOAuthMethodWithUsernamePasswordParameters(parameters);\n params.append('username', parameters.username);\n params.append('password', parameters.password);\n break;\n\n case 'refresh_token':\n AssertOAuthMethodWithRefreshTokenParameters(parameters);\n params.append('refresh_token', parameters.refreshToken);\n break;\n\n default:\n throw new Error('Not supported grant type');\n }\n\n const headers = new HttpHeaders({\n 'Content-type': 'application/x-www-form-urlencoded; charset=utf-8',\n Authorization: `Basic ${parameters.secret}`,\n });\n\n const response = await this.http\n .post<OAuthResponse>(parameters.authEndpoint, params.toString(), {\n headers,\n withCredentials: parameters.withCredentials ?? true,\n })\n .toPromise();\n\n return {\n accessToken: response.access_token,\n refreshToken: response.refresh_token,\n expiresIn: response.expires_in,\n expiresAt: new Date(Date.now() + response.expires_in * 1000),\n };\n }\n\n private getGrantType(parameters: OAuthMethodParameters) {\n if (parameters.grantType) {\n return parameters.grantType;\n }\n\n if (IsOAuthMethodWithRefreshTokenParameters(parameters)) {\n return 'refresh_token';\n }\n\n if (IsOAuthMethodWithUsernamePasswordParameters(parameters)) {\n return 'password';\n }\n\n throw new Error('Could not guess the grant type');\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport function DefaultRedirectSignInFactory(): string[] {\n return [ '/', 'authentication', 'login' ];\n}\n\nexport const RXAP_O_AUTH_REDIRECT_SIGN_IN = new InjectionToken('rxap/o-auth/redirect-sign-in', {\n providedIn: 'root',\n factory: DefaultRedirectSignInFactory\n});\n\nexport const RXAP_O_AUTH_REDIRECT_SIGN_OUT = new InjectionToken('rxap/o-auth/redirect-sign-out');\n\nexport function DefaultRedirectUrl(): string {\n return location.origin + '/oauth';\n}\n\nexport const RXAP_O_AUTH_REDIRECT_URL = new InjectionToken('rxap/o-auth/redirect-url', {\n providedIn: 'root',\n factory: DefaultRedirectUrl\n});\n","import {\n Inject,\n Injectable,\n InjectionToken,\n Optional\n} from '@angular/core';\nimport {\n GetOAuthProfileMethod,\n PROFILE_AUTH_ENDPOINT\n} from './get-o-auth-profile.method';\nimport {\n OAuthMethod,\n OAuthMethodResponse\n} from './o-auth.method';\nimport {\n RXAP_O_AUTH_REDIRECT_SIGN_OUT,\n RXAP_O_AUTH_REDIRECT_URL\n} from './tokens';\nimport { Router } from '@angular/router';\n\nexport const OAUTH_SECRET = new InjectionToken('OAUTH_SECRET');\nexport const OAUTH_AUTH_ENDPOINT = new InjectionToken('OAUTH_AUTH_ENDPOINT');\nexport const OAUTH_SSO_URL = new InjectionToken('OAUTH_SSO_URL');\n\nexport const ACCESS_TOKEN_LOCAL_STORAGE_KEY = 'access_token';\nexport const REFRESH_TOKEN_LOCAL_STORAGE_KEY = 'refresh_token';\nexport const EXPIRES_AT_LOCAL_STORAGE_KEY = 'expires_at';\nexport const REMEMBER_LOCAL_STORAGE_KEY = 'remember';\n\nexport interface OAuthStatus {\n accessToken: string;\n refreshToken?: string | null;\n expiresIn: number;\n expiresAt: Date;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class OAuthService<Profile = any> {\n get expiresAt(): Date | null {\n const expiresAt = this.getItem(EXPIRES_AT_LOCAL_STORAGE_KEY);\n if (expiresAt) {\n return new Date(\n parseInt(this.getItem(EXPIRES_AT_LOCAL_STORAGE_KEY)!, 10)\n );\n }\n return null;\n }\n\n set expiresAt(value: Date | null) {\n if (value) {\n this.setItem(EXPIRES_AT_LOCAL_STORAGE_KEY, value.getTime().toFixed(0));\n } else {\n this.removeItem(EXPIRES_AT_LOCAL_STORAGE_KEY);\n }\n }\n\n get refreshToken(): string | null {\n return this.getItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY);\n }\n\n set refreshToken(value: string | null) {\n if (value) {\n this.setItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY, value);\n } else {\n this.removeItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY);\n }\n }\n\n get accessToken(): string | null {\n return this.getItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY);\n }\n\n set accessToken(value: string | null) {\n if (value) {\n this.setItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY, value);\n } else {\n this.removeItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY);\n }\n }\n\n /**\n * The time until the access token expires in seconds\n */\n public get expiresIn(): number | null {\n const expiresAt = this.expiresAt;\n if (expiresAt) {\n return Math.round(\n (expiresAt.getTime() - Date.now()) / 1000\n );\n }\n return null;\n }\n\n public get remember(): boolean {\n return !!this.getItem(REMEMBER_LOCAL_STORAGE_KEY);\n }\n\n public set remember(value: boolean) {\n if (value) {\n this.setItem(REMEMBER_LOCAL_STORAGE_KEY, 'true');\n } else {\n this.removeItem(REMEMBER_LOCAL_STORAGE_KEY);\n }\n }\n\n private _profile?: Profile | null;\n\n protected _isAuthenticated: boolean | null = null;\n\n public get profile(): Profile | null | undefined {\n return this._profile;\n }\n\n constructor(\n @Inject(OAuthMethod)\n public readonly oAuthMethod: OAuthMethod,\n @Inject(GetOAuthProfileMethod)\n public readonly getOAuthProfileMethod: GetOAuthProfileMethod,\n @Inject(Router)\n private readonly router: Router,\n @Optional()\n @Inject(PROFILE_AUTH_ENDPOINT)\n public profileEndpoint: string | null = null,\n @Optional()\n @Inject(OAUTH_AUTH_ENDPOINT)\n public authEndpoint: string | null = null,\n @Optional()\n @Inject(OAUTH_SECRET)\n public secret: string | null = null,\n @Optional()\n @Inject(OAUTH_SSO_URL)\n private readonly ssoUrl: string | null = null,\n @Optional()\n @Inject(RXAP_O_AUTH_REDIRECT_SIGN_OUT)\n private readonly redirectSignOut: string[] | null = null,\n @Optional()\n @Inject(RXAP_O_AUTH_REDIRECT_URL)\n private readonly redirectUrl: string | null = null\n ) {}\n\n public signInWithRedirect(lastUrl?: string): void {\n if (!this.redirectUrl) {\n throw new Error('Redirect url is not defined');\n }\n location.replace(\n `${this.ssoUrl}?redirect=${btoa(this.redirectUrl)}&secret=${\n this.secret\n }&payload=${btoa(JSON.stringify({ lastUrl }))}`\n );\n }\n\n public async isAuthenticated(): Promise<boolean> {\n if (!this.secret) {\n throw new Error('The oauth secret is not defined');\n }\n\n if (!this.authEndpoint) {\n throw new Error('The oauth auth endpoint is not defined');\n }\n\n if (this._isAuthenticated !== null) {\n return this._isAuthenticated;\n }\n\n if (this.accessToken) {\n console.debug('Access token is defined: ' + this.accessToken);\n if (this.expiresIn && this.expiresIn > 60) {\n const profile = await this.getProfile();\n\n if (!profile) {\n console.log('profile is not defined');\n return (this._isAuthenticated = false);\n }\n\n this.authenticated(\n {\n refreshToken: this.refreshToken,\n accessToken: this.accessToken,\n expiresAt: this.expiresAt ?? new Date(Date.now() + 60 * 1000),\n expiresIn: this.expiresIn,\n },\n this.remember\n );\n\n return (this._isAuthenticated = true);\n } else {\n this.accessToken = null;\n this.expiresAt = null;\n console.warn(\n 'The access token expires soon. Use refresh token instead.'\n );\n }\n }\n if (this.refreshToken) {\n console.debug('Refresh token is defined: ' + this.refreshToken);\n try {\n await this.signInWithRefreshToken(this.refreshToken);\n return (this._isAuthenticated = true);\n } catch (e) {\n if (![401, 403, 400].includes(e.status)) {\n console.error('Could not sign in with refresh token', e.message);\n throw e;\n }\n console.warn('Refresh token is expired');\n }\n }\n\n console.warn('Unauthenticated');\n\n return (this._isAuthenticated = false);\n }\n\n public async signInWithEmailAndPassword(\n email: string,\n password: string,\n remember: boolean\n ): Promise<OAuthMethodResponse> {\n if (!this.secret) {\n throw new Error('The oauth secret is not defined');\n }\n\n if (!this.authEndpoint) {\n throw new Error('The oauth auth endpoint is not defined');\n }\n\n const response = await this.oAuthMethod.call({\n username: email,\n password: password,\n authEndpoint: this.authEndpoint,\n secret: this.secret,\n });\n\n this.authenticated(response, remember);\n\n return response;\n }\n\n public async getProfile<T extends Profile = Profile>(): Promise<T | null> {\n let profile: T | null = null;\n\n if (!this.accessToken) {\n throw new Error('The access token is not defined');\n }\n\n if (this.profileEndpoint) {\n try {\n profile = await this.getOAuthProfileMethod.call({\n accessToken: this.accessToken,\n profileEndpoint: this.profileEndpoint,\n });\n } catch (e) {\n console.error('Could not request the user profile', e.message);\n }\n } else {\n console.warn('The profile endpoint is not defined!');\n }\n\n return (this._profile = profile);\n }\n\n public async signOut() {\n this.clearStorage();\n this.accessToken = null;\n this.refreshToken = null;\n this.expiresAt = null;\n this._isAuthenticated = false;\n if (this.redirectSignOut) {\n await this.router.navigate(this.redirectSignOut);\n } else {\n if (!this.redirectUrl) {\n throw new Error('Redirect url is not defined');\n }\n location.replace(\n `${this.ssoUrl}?redirect=${btoa(this.redirectUrl)}&secret=${this.secret}&action=signOut`\n );\n }\n }\n\n public authenticated(\n response: OAuthStatus,\n remember: boolean = this.remember ?? false\n ): void {\n this.accessToken = response.accessToken;\n this.refreshToken = response.refreshToken ?? null;\n this.expiresAt = response.expiresAt;\n\n console.log(`Authenticated until ${this.expiresAt.toISOString()}`);\n\n this.remember = remember;\n\n if (remember) {\n this.setItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY, response.accessToken);\n if (response.refreshToken) {\n this.setItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY, response.refreshToken);\n }\n this.setItem(REMEMBER_LOCAL_STORAGE_KEY, 'true');\n if (response.expiresAt) {\n console.log(`Authenticated until ${response.expiresAt.toISOString()}`);\n this.setItem(\n EXPIRES_AT_LOCAL_STORAGE_KEY,\n response.expiresAt.getTime().toFixed(0)\n );\n }\n } else {\n this.removeItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY);\n this.removeItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY);\n this.removeItem(REMEMBER_LOCAL_STORAGE_KEY);\n this.removeItem(EXPIRES_AT_LOCAL_STORAGE_KEY);\n }\n\n this._isAuthenticated = true;\n }\n\n private getKey(key: string): string {\n return [this.secret, key].join('__');\n }\n\n private getItem(key: string): string | null {\n return localStorage.getItem(this.getKey(key));\n }\n\n private setItem(key: string, value: string): void {\n localStorage.setItem(this.getKey(key), value);\n }\n\n private removeItem(key: string): void {\n localStorage.removeItem(this.getKey(key));\n }\n\n protected clearStorage() {\n this.removeItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY);\n this.removeItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY);\n this.removeItem(REMEMBER_LOCAL_STORAGE_KEY);\n this.removeItem(EXPIRES_AT_LOCAL_STORAGE_KEY);\n }\n\n private async signInWithRefreshToken(\n refreshToken: string\n ): Promise<OAuthMethodResponse> {\n if (!this.secret) {\n throw new Error('The oauth secret is not defined');\n }\n\n if (!this.authEndpoint) {\n throw new Error('The oauth auth endpoint is not defined');\n }\n\n const response = await this.oAuthMethod.call({\n refreshToken,\n authEndpoint: this.authEndpoint,\n secret: this.secret,\n });\n\n this.authenticated(response);\n\n return response;\n }\n}\n","import {\n ActivatedRouteSnapshot,\n CanActivate,\n UrlTree,\n Router\n} from '@angular/router';\nimport { Injectable } from '@angular/core';\nimport { OAuthService } from './o-auth.service';\n\n@Injectable({ providedIn: 'root' })\nexport class OAuthExtractGuard implements CanActivate {\n\n constructor(\n private readonly router: Router,\n private readonly oAuthService: OAuthService\n ) {}\n\n public canActivate(route: ActivatedRouteSnapshot): UrlTree {\n\n if (route.queryParamMap.has('accessToken') && route.queryParamMap.has('refreshToken') && route.queryParamMap.has('expiresIn')) {\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const accessToken = route.queryParamMap.get('accessToken')!;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const refreshToken = route.queryParamMap.get('refreshToken')!;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const expiresIn = parseInt(route.queryParamMap.get('expiresIn')!, 10);\n const payloadBase64 = route.queryParamMap.get('payload');\n\n const expiresAt = new Date(Date.now() + expiresIn * 1000);\n\n this.oAuthService.authenticated({\n accessToken,\n refreshToken,\n expiresIn,\n expiresAt\n }, true);\n\n let redirectUrl = '/';\n\n if (payloadBase64) {\n try {\n const payload = JSON.parse(atob(payloadBase64));\n console.debug('sso redirect payload', payload);\n if (payload.lastUrl) {\n redirectUrl = payload.lastUrl;\n }\n } catch (e) {\n console.error('Could not parse redirect payload', e.message);\n }\n }\n\n return this.router.createUrlTree([ redirectUrl ]);\n\n } else {\n console.warn('Not every query parameter is defined!');\n }\n\n return this.router.createUrlTree([ ...route.url.map(url => url.path), 'redirect' ]);\n }\n\n\n}\n","import {\n ActivatedRouteSnapshot,\n CanActivate,\n CanActivateChild,\n RouterStateSnapshot,\n UrlTree\n} from '@angular/router';\nimport {\n Injectable,\n Inject,\n isDevMode\n} from '@angular/core';\nimport { OAuthService } from './o-auth.service';\n\n@Injectable({ providedIn: 'root' })\nexport class OAuthRedirectGuard implements CanActivate, CanActivateChild {\n\n constructor(\n @Inject(OAuthService)\n private readonly oAuthService: OAuthService\n ) {\n }\n\n public async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean | UrlTree> {\n\n const isAuthenticated = await this.oAuthService.isAuthenticated();\n\n console.log(`isAuthenticated: ${isAuthenticated}`);\n\n if (isAuthenticated) {\n return true;\n }\n\n this.oAuthService.signInWithRedirect(state.url);\n\n return false;\n\n }\n\n public canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean | UrlTree> {\n return this.canActivate(childRoute, state);\n }\n\n}\n","import {\n NgModule,\n ModuleWithProviders\n} from '@angular/core';\nimport {\n RXAP_O_AUTH_REDIRECT_SIGN_IN,\n RXAP_O_AUTH_REDIRECT_SIGN_OUT\n} from './tokens';\n\nexport interface OAuthModuleOptions {\n signInPath?: string[]\n signOutPath?: string[]\n}\n\n@NgModule()\nexport class OAuthModule {\n\n public static forRoot(options: OAuthModuleOptions = {}): ModuleWithProviders<OAuthModule> {\n return {\n ngModule: OAuthModule,\n providers: [\n {\n provide: RXAP_O_AUTH_REDIRECT_SIGN_IN,\n useValue: options.signInPath ?? [ '/', 'oauth', 'redirect' ]\n },\n {\n provide: RXAP_O_AUTH_REDIRECT_SIGN_OUT,\n useValue: options.signOutPath ?? null\n }\n ]\n };\n }\n\n}\n","import {\n Component,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\nimport {\n trigger,\n transition,\n style,\n animate\n} from '@angular/animations';\n\n@Component({\n selector: 'rxap-container',\n templateUrl: './container.component.html',\n styleUrls: [ './container.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'rxap-container' },\n animations: [\n trigger('routeAnimations', [\n transition(\n ':enter',\n [\n style({ opacity: 0 }),\n animate('512ms', style({ opacity: 1 }))\n ]\n ),\n transition(\n ':leave',\n [\n style({ opacity: 1 }),\n animate('512ms', style({ opacity: 0 }))\n ]\n )\n ])\n ]\n})\nexport class ContainerComponent {\n\n public prepareRoute(outlet: RouterOutlet) {\n return outlet.isActivated ? outlet.activatedRoute : 'true';\n }\n\n}\n","<div [@routeAnimations]=\"prepareRoute(outlet)\" class=\"container\">\n\n <div class=\"split mat-elevation-z3\"></div>\n\n <router-outlet #outlet=\"outlet\"></router-outlet>\n\n</div>\n","import {\n ChangeDetectionStrategy,\n Component\n} from '@angular/core';\n\n@Component({\n selector: 'rxap-loading',\n templateUrl: './loading.component.html',\n styleUrls: [ './loading.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'rxap-loading' }\n})\nexport class LoadingComponent {\n}\n","<mat-progress-bar class=\"loading-bar\" mode=\"indeterminate\"></mat-progress-bar>\n","import {\n Component,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { OAuthService } from '../o-auth.service';\nimport {\n trigger,\n state,\n style,\n transition,\n animate\n} from '@angular/animations';\n\n@Component({\n selector: 'rxap-sign-in-with-redirect',\n templateUrl: './sign-in-with-redirect.component.html',\n styleUrls: [ './sign-in-with-redirect.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'rxap-sign-in-with-redirect' },\n animations: [\n trigger('fadeAnimation', [\n\n // the \"in\" style determines the \"resting\" state of the element when it is visible.\n state('in', style({ opacity: 1 })),\n\n // fade in when created. this could also be written as transition('void => *')\n transition(':enter', [\n style({ opacity: 0 }),\n animate(300)\n ]),\n\n // fade out when destroyed. this could also be written as transition('void => *')\n transition(\n ':leave',\n animate(300, style({ opacity: 0 }))\n )\n ])\n ]\n})\nexport class SignInWithRedirectComponent {\n\n constructor(\n private readonly authService: OAuthService\n ) {}\n\n public signIn() {\n this.authService.signInWithRedirect();\n }\n\n}\n","<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"32px\">\n\n <div class=\"header\" fxFlex=\"nogrow\" fxLayout=\"column\" fxLayoutAlign=\"center center\">\n\n <mat-icon class=\"avatar-icon\" color=\"primary\" fxFlex=\"nogrow\">account_circle</mat-icon>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"signIn()\" color=\"primary\" fxFlex=\"nogrow\" mat-raised-button>\n <span fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"16px\">\n <mat-icon fxFlex=\"nogrow\">login</mat-icon>\n <span fxFlex=\"nogrow\">Sign In</span>\n </span>\n </button>\n </div>\n\n </div>\n\n</div>\n\n","import { Routes } from '@angular/router';\nimport {\n ContainerComponent\n} from './container/container.component';\nimport { LoadingComponent } from './loading/loading.component';\nimport { SignInWithRedirectComponent } from './sign-in-with-redirect/sign-in-with-redirect.component';\nimport { OAuthExtractGuard } from './o-auth-extract.guard';\n\nexport const RXAP_O_AUTH_ROUTES: Routes = [\n {\n path: 'oauth',\n component: ContainerComponent,\n children: [\n {\n path: 'redirect',\n component: SignInWithRedirectComponent\n },\n {\n canActivate: [ OAuthExtractGuard ],\n path: '',\n component: LoadingComponent\n },\n {\n path: '**',\n redirectTo: ''\n }\n ]\n }\n];\n","import {\n Resolve,\n Router\n} from '@angular/router';\nimport {\n Inject,\n Injectable\n} from '@angular/core';\nimport { OAuthService } from './o-auth.service';\nimport { RXAP_O_AUTH_REDIRECT_SIGN_IN } from './tokens';\n\n@Injectable({ providedIn: 'root' })\nexport class ProfileResolve<T = Record<string, any>> implements Resolve<T> {\n\n constructor(\n @Inject(OAuthService)\n private readonly oAuthService: OAuthService,\n @Inject(Router)\n private readonly router: Router,\n @Inject(RXAP_O_AUTH_REDIRECT_SIGN_IN)\n private readonly redirectLogin: string[]\n ) {\n }\n\n public async resolve(): Promise<T> {\n const profile = await this.oAuthService.getProfile();\n\n if (!profile) {\n await this.router.navigate(this.redirectLogin);\n }\n\n return profile;\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { ContainerComponent } from './container.component';\nimport { RouterModule } from '@angular/router';\n\n\n@NgModule({\n declarations: [ ContainerComponent ],\n imports: [\n RouterModule\n ],\n exports: [ ContainerComponent ]\n})\nexport class ContainerComponentModule {}\n","import { NgModule } from '@angular/core';\nimport { LoadingComponent } from './loading.component';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\n\n\n@NgModule({\n declarations: [\n LoadingComponent\n ],\n imports: [\n MatProgressBarModule\n ],\n exports: [\n LoadingComponent\n ]\n})\nexport class LoadingComponentModule {\n}\n","import { NgModule } from '@angular/core';\nimport { SignInWithRedirectComponent } from './sign-in-with-redirect.component';\nimport { MatIconModule } from '@angular/material/icon';\nimport { CommonModule } from '@angular/common';\nimport { MatCardModule } from '@angular/material/card';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MatButtonModule } from '@angular/material/button';\n\n\n@NgModule({\n declarations: [ SignInWithRedirectComponent ],\n imports: [\n MatCardModule,\n MatButtonModule,\n FlexLayoutModule,\n MatIconModule,\n CommonModule\n ],\n exports: [ SignInWithRedirectComponent ]\n})\nexport class SignInWithRedirectComponentModule {}\n","import { NgModule } from '@angular/core';\nimport { ContainerComponentModule } from './container/container.component.module';\nimport { LoadingComponentModule } from './loading/loading.component.module';\nimport {\n SignInWithRedirectComponentModule\n} from './sign-in-with-redirect/sign-in-with-redirect.component.module';\n\n@NgModule({\n exports: [\n ContainerComponentModule,\n LoadingComponentModule,\n SignInWithRedirectComponentModule\n ]\n})\nexport class OAuthRoutingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MASa,qBAAqB,GAAG,IAAI,cAAc,CACrD,uBAAuB,EACvB;MASW,qBAAqB;IAGhC,YAEmB,IAAgB,EAG1B,kBAAiC,IAAI;QAH3B,SAAI,GAAJ,IAAI,CAAY;QAG1B,oBAAe,GAAf,eAAe,CAAsB;KAC1C;IAEG,IAAI,CAAC,UAA2C;;QACrD,MAAM,eAAe,GAAG,MAAA,UAAU,CAAC,eAAe,mCAAI,IAAI,CAAC,eAAe,CAAC;QAE3E,IAAI,CAAC,eAAe,EAAE;YACpB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;SACxD;QAED,OAAO,IAAI,CAAC,IAAI;aACb,GAAG,CAAI,eAAe,EAAE;YACvB,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,UAAU,CAAC,WAAW,EAAE;aAClD;YACD,eAAe,EAAE,MAAA,UAAU,CAAC,eAAe,mCAAI,IAAI;SACpD,CAAC;aACD,SAAS,EAAE,CAAC;KAChB;;mHA1BU,qBAAqB,kBAItB,UAAU,aAGV,qBAAqB;uHAPpB,qBAAqB,cADR,MAAM;4FACnB,qBAAqB;kBADjC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;0BAK7B,MAAM;2BAAC,UAAU;;0BAEjB,QAAQ;;0BACR,MAAM;2BAAC,qBAAqB;;;SCGjB,uCAAuC,CACrD,UAAiC;;IAGjC,OAAO,UAAU,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AACnD,CAAC;SAEe,2CAA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
|
3
|
+
"version": "12.0.10",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular-devkit/schematics": "^12.2.9",
|
|
6
6
|
"@angular/animations": "^12.0.1",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"@angular/flex-layout": "^12.0.0-beta.34",
|
|
11
11
|
"@angular/material": "^12.0.1",
|
|
12
12
|
"@angular/router": "^12.0.1",
|
|
13
|
-
"@rxap/directives": "^12.1
|
|
14
|
-
"@rxap/services": "^12.0.8
|
|
15
|
-
"@rxap/utilities": "^12.2.
|
|
13
|
+
"@rxap/directives": "^12.3.1",
|
|
14
|
+
"@rxap/services": "^12.0.8",
|
|
15
|
+
"@rxap/utilities": "^12.2.3",
|
|
16
16
|
"reflect-metadata": "^0.1.13",
|
|
17
17
|
"rxjs": "^6.5.5"
|
|
18
18
|
},
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"save": "dependencies"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@rxap/schematics-utilities": "^12.
|
|
50
|
+
"@rxap/schematics-utilities": "^12.7.0",
|
|
51
51
|
"tslib": "^2.2.0"
|
|
52
52
|
},
|
|
53
53
|
"main": "bundles/rxap-oauth.umd.js",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class ErrorComponent {
|
|
3
|
-
get topLevelDomain():
|
|
3
|
+
get topLevelDomain(): string;
|
|
4
4
|
get mainApplicationUrl(): string;
|
|
5
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorComponent, never>;
|
|
6
6
|
static ɵcmp: i0.ɵɵComponentDeclaration<ErrorComponent, "rxap-error", never, {}, {}, never, never>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
4
4
|
function default_1() {
|
|
5
|
-
return schematics_utilities_1.InstallPeerDependencies();
|
|
5
|
+
return (0, schematics_utilities_1.InstallPeerDependencies)();
|
|
6
6
|
}
|
|
7
7
|
exports.default = default_1;
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/oauth/src/schematics/ng-add/index.ts"],"names":[],"mappings":";;AACA,qEAAqE;AAErE;IACE,OAAO,8CAAuB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/oauth/src/schematics/ng-add/index.ts"],"names":[],"mappings":";;AACA,qEAAqE;AAErE;IACE,OAAO,IAAA,8CAAuB,GAAE,CAAC;AACnC,CAAC;AAFD,4BAEC"}
|