@rxap/oauth 16.0.0-dev.0 → 16.0.0-dev.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.
Files changed (33) hide show
  1. package/esm2022/index.mjs +1 -5
  2. package/esm2022/lib/container/container.component.mjs +4 -4
  3. package/esm2022/lib/loading/loading.component.mjs +5 -4
  4. package/esm2022/lib/sign-in-with-redirect/sign-in-with-redirect.component.mjs +9 -6
  5. package/esm2022/single-sign-on/lib/continue/continue.component.mjs +22 -14
  6. package/esm2022/single-sign-on/lib/error/error.component.mjs +6 -4
  7. package/esm2022/single-sign-on/lib/o-auth-single-sign-on-routing.module.mjs +4 -18
  8. package/esm2022/single-sign-on/public_api.mjs +1 -3
  9. package/fesm2022/rxap-oauth-single-sign-on.mjs +58 -121
  10. package/fesm2022/rxap-oauth-single-sign-on.mjs.map +1 -1
  11. package/fesm2022/rxap-oauth.mjs +15 -101
  12. package/fesm2022/rxap-oauth.mjs.map +1 -1
  13. package/index.d.ts +0 -4
  14. package/lib/container/container.component.d.ts +1 -1
  15. package/lib/loading/loading.component.d.ts +1 -1
  16. package/lib/sign-in-with-redirect/sign-in-with-redirect.component.d.ts +1 -1
  17. package/package.json +9 -9
  18. package/single-sign-on/lib/continue/continue.component.d.ts +1 -1
  19. package/single-sign-on/lib/error/error.component.d.ts +1 -1
  20. package/single-sign-on/lib/o-auth-single-sign-on-routing.module.d.ts +1 -4
  21. package/single-sign-on/public_api.d.ts +0 -2
  22. package/esm2022/lib/container/container.component.module.mjs +0 -21
  23. package/esm2022/lib/loading/loading.component.module.mjs +0 -25
  24. package/esm2022/lib/o-auth-routing.module.mjs +0 -26
  25. package/esm2022/lib/sign-in-with-redirect/sign-in-with-redirect.component.module.mjs +0 -37
  26. package/esm2022/single-sign-on/lib/continue/continue.component.module.mjs +0 -41
  27. package/esm2022/single-sign-on/lib/error/error.component.module.mjs +0 -29
  28. package/lib/container/container.component.module.d.ts +0 -8
  29. package/lib/loading/loading.component.module.d.ts +0 -8
  30. package/lib/o-auth-routing.module.d.ts +0 -9
  31. package/lib/sign-in-with-redirect/sign-in-with-redirect.component.module.d.ts +0 -12
  32. package/single-sign-on/lib/continue/continue.component.module.d.ts +0 -12
  33. package/single-sign-on/lib/error/error.component.module.d.ts +0 -9
@@ -3,20 +3,18 @@ import { InjectionToken, Injectable, Inject, Optional, NgModule, Component, Chan
3
3
  import * as i1 from '@angular/common/http';
4
4
  import { HttpClient, HttpHeaders } from '@angular/common/http';
5
5
  import * as i1$1 from '@angular/router';
6
- import { Router, RouterModule } from '@angular/router';
6
+ import { Router, RouterOutlet } from '@angular/router';
7
7
  import { ReplaySubject } from 'rxjs';
8
8
  import { AuthenticationEventType } from '@rxap/authentication';
9
9
  import { trigger, transition, style, animate, state } from '@angular/animations';
10
- import * as i1$2 from '@angular/material/legacy-progress-bar';
11
- import { MatLegacyProgressBarModule } from '@angular/material/legacy-progress-bar';
12
- import * as i2 from '@angular/material/legacy-button';
13
- import { MatLegacyButtonModule } from '@angular/material/legacy-button';
14
- import * as i3 from '@angular/flex-layout/flex';
15
- import * as i4 from '@angular/material/icon';
10
+ import * as i1$2 from '@angular/material/progress-bar';
11
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
12
+ import * as i4 from '@angular/material/button';
13
+ import { MatButtonModule } from '@angular/material/button';
14
+ import * as i3 from '@angular/material/icon';
16
15
  import { MatIconModule } from '@angular/material/icon';
17
- import { CommonModule } from '@angular/common';
18
- import { MatLegacyCardModule } from '@angular/material/legacy-card';
19
- import { FlexLayoutModule } from '@angular/flex-layout';
16
+ import * as i2 from '@angular/flex-layout/flex';
17
+ import { FlexModule } from '@angular/flex-layout/flex';
20
18
 
21
19
  const PROFILE_AUTH_ENDPOINT = new InjectionToken('PROFILE_AUTH_ENDPOINT');
22
20
  class GetOAuthProfileMethod {
@@ -596,7 +594,7 @@ class ContainerComponent {
596
594
  return outlet.isActivated ? outlet.activatedRoute : 'true';
597
595
  }
598
596
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
599
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", 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}\n"], dependencies: [{ kind: "directive", type: i1$1.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], animations: [
597
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: ContainerComponent, isStandalone: true, 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}\n"], dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], animations: [
600
598
  trigger('routeAnimations', [
601
599
  transition(':enter', [
602
600
  style({ opacity: 0 }),
@@ -622,16 +620,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
622
620
  animate('512ms', style({ opacity: 0 }))
623
621
  ])
624
622
  ])
625
- ], 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}\n"] }]
623
+ ], standalone: true, imports: [RouterOutlet], 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}\n"] }]
626
624
  }] });
627
625
 
628
626
  class LoadingComponent {
629
627
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
630
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", 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: [""], dependencies: [{ kind: "component", type: i1$2.MatLegacyProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
628
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: LoadingComponent, isStandalone: true, selector: "rxap-loading", host: { classAttribute: "rxap-loading" }, ngImport: i0, template: "<mat-progress-bar class=\"loading-bar\" mode=\"indeterminate\"></mat-progress-bar>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i1$2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
631
629
  }
632
630
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoadingComponent, decorators: [{
633
631
  type: Component,
634
- args: [{ selector: 'rxap-loading', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-loading' }, template: "<mat-progress-bar class=\"loading-bar\" mode=\"indeterminate\"></mat-progress-bar>\n" }]
632
+ args: [{ selector: 'rxap-loading', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-loading' }, standalone: true, imports: [MatProgressBarModule], template: "<mat-progress-bar class=\"loading-bar\" mode=\"indeterminate\"></mat-progress-bar>\n" }]
635
633
  }] });
636
634
 
637
635
  class SignInWithRedirectComponent {
@@ -642,7 +640,7 @@ class SignInWithRedirectComponent {
642
640
  this.authService.signInWithRedirect();
643
641
  }
644
642
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: SignInWithRedirectComponent, deps: [{ token: OAuthService }], target: i0.ɵɵFactoryTarget.Component }); }
645
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", 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}\n"], dependencies: [{ kind: "component", type: i2.MatLegacyButton, 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"] }, { kind: "directive", type: i3.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"] }, { kind: "directive", type: i3.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"] }, { kind: "directive", type: i3.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"] }, { kind: "directive", type: i3.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"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], animations: [
643
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: SignInWithRedirectComponent, isStandalone: true, 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}\n"], dependencies: [{ kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i2.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"] }, { kind: "directive", type: i2.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"] }, { kind: "directive", type: i2.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"] }, { kind: "directive", type: i2.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"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], animations: [
646
644
  trigger('fadeAnimation', [
647
645
  // the "in" style determines the "resting" state of the element when it is visible.
648
646
  state('in', style({ opacity: 1 })),
@@ -670,7 +668,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
670
668
  // fade out when destroyed. this could also be written as transition('void => *')
671
669
  transition(':leave', animate(300, style({ opacity: 0 })))
672
670
  ])
673
- ], 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}\n"] }]
671
+ ], standalone: true, imports: [FlexModule, MatIconModule, MatButtonModule], 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}\n"] }]
674
672
  }], ctorParameters: function () { return [{ type: OAuthService }]; } });
675
673
 
676
674
  const RXAP_O_AUTH_ROUTES = [
@@ -725,93 +723,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
725
723
  args: [RXAP_O_AUTH_REDIRECT_SIGN_IN]
726
724
  }] }]; } });
727
725
 
728
- class ContainerComponentModule {
729
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ContainerComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
730
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: ContainerComponentModule, declarations: [ContainerComponent], imports: [RouterModule], exports: [ContainerComponent] }); }
731
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ContainerComponentModule, imports: [RouterModule] }); }
732
- }
733
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ContainerComponentModule, decorators: [{
734
- type: NgModule,
735
- args: [{
736
- declarations: [ContainerComponent],
737
- imports: [
738
- RouterModule
739
- ],
740
- exports: [ContainerComponent]
741
- }]
742
- }] });
743
-
744
- class LoadingComponentModule {
745
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoadingComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
746
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: LoadingComponentModule, declarations: [LoadingComponent], imports: [MatLegacyProgressBarModule], exports: [LoadingComponent] }); }
747
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoadingComponentModule, imports: [MatLegacyProgressBarModule] }); }
748
- }
749
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoadingComponentModule, decorators: [{
750
- type: NgModule,
751
- args: [{
752
- declarations: [
753
- LoadingComponent
754
- ],
755
- imports: [
756
- MatLegacyProgressBarModule
757
- ],
758
- exports: [
759
- LoadingComponent
760
- ]
761
- }]
762
- }] });
763
-
764
- class SignInWithRedirectComponentModule {
765
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: SignInWithRedirectComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
766
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: SignInWithRedirectComponentModule, declarations: [SignInWithRedirectComponent], imports: [MatLegacyCardModule,
767
- MatLegacyButtonModule,
768
- FlexLayoutModule,
769
- MatIconModule,
770
- CommonModule], exports: [SignInWithRedirectComponent] }); }
771
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: SignInWithRedirectComponentModule, imports: [MatLegacyCardModule,
772
- MatLegacyButtonModule,
773
- FlexLayoutModule,
774
- MatIconModule,
775
- CommonModule] }); }
776
- }
777
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: SignInWithRedirectComponentModule, decorators: [{
778
- type: NgModule,
779
- args: [{
780
- declarations: [SignInWithRedirectComponent],
781
- imports: [
782
- MatLegacyCardModule,
783
- MatLegacyButtonModule,
784
- FlexLayoutModule,
785
- MatIconModule,
786
- CommonModule
787
- ],
788
- exports: [SignInWithRedirectComponent]
789
- }]
790
- }] });
791
-
792
- class OAuthRoutingModule {
793
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OAuthRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
794
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: OAuthRoutingModule, exports: [ContainerComponentModule,
795
- LoadingComponentModule,
796
- SignInWithRedirectComponentModule] }); }
797
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OAuthRoutingModule, imports: [ContainerComponentModule,
798
- LoadingComponentModule,
799
- SignInWithRedirectComponentModule] }); }
800
- }
801
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OAuthRoutingModule, decorators: [{
802
- type: NgModule,
803
- args: [{
804
- exports: [
805
- ContainerComponentModule,
806
- LoadingComponentModule,
807
- SignInWithRedirectComponentModule
808
- ]
809
- }]
810
- }] });
811
-
812
726
  /**
813
727
  * Generated bundle index. Do not edit.
814
728
  */
815
729
 
816
- export { ACCESS_TOKEN_LOCAL_STORAGE_KEY, AssertOAuthMethodParameters, AssertOAuthMethodWithRefreshTokenParameters, AssertOAuthMethodWithUsernamePasswordParameters, ContainerComponent, ContainerComponentModule, DefaultRedirectSignInFactory, DefaultRedirectUrl, EXPIRES_AT_LOCAL_STORAGE_KEY, GetOAuthProfileMethod, IsOAuthMethodWithRefreshTokenParameters, IsOAuthMethodWithUsernamePasswordParameters, LoadingComponent, LoadingComponentModule, OAUTH_AUTH_ENDPOINT, OAUTH_CLIENT_ID, OAUTH_SECRET, OAUTH_SSO_URL, OAuthExtractGuard, OAuthMethod, OAuthModule, OAuthRedirectGuard, OAuthRoutingModule, OAuthService, PROFILE_AUTH_ENDPOINT, ProfileResolve, REFRESH_TOKEN_LOCAL_STORAGE_KEY, REMEMBER_LOCAL_STORAGE_KEY, RXAP_O_AUTH_REDIRECT_SIGN_IN, RXAP_O_AUTH_REDIRECT_SIGN_OUT, RXAP_O_AUTH_REDIRECT_URL, RXAP_O_AUTH_ROUTES, SignInWithRedirectComponent, SignInWithRedirectComponentModule };
730
+ export { ACCESS_TOKEN_LOCAL_STORAGE_KEY, AssertOAuthMethodParameters, AssertOAuthMethodWithRefreshTokenParameters, AssertOAuthMethodWithUsernamePasswordParameters, ContainerComponent, DefaultRedirectSignInFactory, DefaultRedirectUrl, EXPIRES_AT_LOCAL_STORAGE_KEY, GetOAuthProfileMethod, IsOAuthMethodWithRefreshTokenParameters, IsOAuthMethodWithUsernamePasswordParameters, LoadingComponent, OAUTH_AUTH_ENDPOINT, OAUTH_CLIENT_ID, OAUTH_SECRET, OAUTH_SSO_URL, OAuthExtractGuard, OAuthMethod, OAuthModule, OAuthRedirectGuard, OAuthService, PROFILE_AUTH_ENDPOINT, ProfileResolve, REFRESH_TOKEN_LOCAL_STORAGE_KEY, REMEMBER_LOCAL_STORAGE_KEY, RXAP_O_AUTH_REDIRECT_SIGN_IN, RXAP_O_AUTH_REDIRECT_SIGN_OUT, RXAP_O_AUTH_REDIRECT_URL, RXAP_O_AUTH_ROUTES, SignInWithRedirectComponent };
817
731
  //# sourceMappingURL=rxap-oauth.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-oauth.mjs","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 clientId?: string;\n authEndpoint: string;\n}\n\nexport interface OAuthMethodWithRefreshTokenParameters {\n grantType?: string;\n refreshToken: string;\n secret: string;\n clientId?: 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 let headers = new HttpHeaders();\n\n headers = headers.append('Content-type', 'application/x-www-form-urlencoded; charset=utf-8');\n\n if (parameters.secret && parameters.clientId) {\n params.append('client_id', parameters.clientId);\n params.append('client_secret', parameters.secret);\n } else {\n headers = headers.append('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';\nimport { ReplaySubject, Subject } from 'rxjs';\nimport { AuthenticationEvent, AuthenticationEventType } from '@rxap/authentication';\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');\nexport const OAUTH_CLIENT_ID = new InjectionToken('OAUTH_CLIENT_ID');\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\n public readonly events$ = new ReplaySubject<AuthenticationEvent>();\n\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 @Optional()\n @Inject(OAUTH_CLIENT_ID)\n public clientId: 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: any) {\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 clientId: this.clientId ?? undefined\n }).catch(e => {\n this.events$.next({ type: AuthenticationEventType.OnAuthError });\n throw e;\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: any) {\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 this.events$.next({ type: AuthenticationEventType.OnLogout });\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 this.events$.next({ type: AuthenticationEventType.OnAuthSuccess });\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 clientId: this.clientId ?? undefined,\n });\n\n this.authenticated(response);\n\n return response;\n }\n}\n","import { ActivatedRouteSnapshot, UrlTree, Router } from '@angular/router';\nimport { Injectable } from '@angular/core';\nimport { OAuthService } from './o-auth.service';\n\n@Injectable({ providedIn: 'root' })\nexport class OAuthExtractGuard {\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: any) {\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 { ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree } 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 {\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 { Router } 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>> {\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 { MatLegacyProgressBarModule as MatProgressBarModule } from '@angular/material/legacy-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 { MatLegacyCardModule as MatCardModule } from '@angular/material/legacy-card';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-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":["i1","i2.OAuthService","i1.OAuthService","MatProgressBarModule","MatCardModule","MatButtonModule"],"mappings":";;;;;;;;;;;;;;;;;;;;MASa,qBAAqB,GAAG,IAAI,cAAc,CACrD,uBAAuB,EACvB;AAQF,MACa,qBAAqB,CAAA;IAGhC,WAEmB,CAAA,IAAgB,EAG1B,eAAA,GAAiC,IAAI,EAAA;QAH3B,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAG1B,IAAe,CAAA,eAAA,GAAf,eAAe,CAAsB;KAC1C;AAEG,IAAA,IAAI,CAAC,UAA2C,EAAA;QACrD,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,IAAI,IAAI,CAAC,eAAe,CAAC;QAE3E,IAAI,CAAC,eAAe,EAAE;AACpB,YAAA,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;AACxD,SAAA;QAED,OAAO,IAAI,CAAC,IAAI;aACb,GAAG,CAAI,eAAe,EAAE;AACvB,YAAA,OAAO,EAAE;AACP,gBAAA,aAAa,EAAE,CAAA,OAAA,EAAU,UAAU,CAAC,WAAW,CAAE,CAAA;AAClD,aAAA;AACD,YAAA,eAAe,EAAE,UAAU,CAAC,eAAe,IAAI,IAAI;SACpD,CAAC;AACD,aAAA,SAAS,EAAE,CAAC;KAChB;8GA1BU,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA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,2BAA2B,CAAE;AAC7C,oBAAA,OAAO,EAAO;wBACZD,mBAAa;wBACbC,qBAAe;wBACf,gBAAgB;wBAChB,aAAa;wBACb,YAAY;AACb,qBAAA;oBACD,OAAO,EAAO,CAAE,2BAA2B,CAAE;AAC9C,iBAAA,CAAA;;;ACZD,MAOa,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAL3B,wBAAwB;YACxB,sBAAsB;YACtB,iCAAiC,CAAA,EAAA,CAAA,CAAA,EAAA;AAGxB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAL3B,wBAAwB;YACxB,sBAAsB;YACtB,iCAAiC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGxB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAP9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,wBAAwB;wBACxB,sBAAsB;wBACtB,iCAAiC;AAClC,qBAAA;AACF,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"rxap-oauth.mjs","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/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 clientId?: string;\n authEndpoint: string;\n}\n\nexport interface OAuthMethodWithRefreshTokenParameters {\n grantType?: string;\n refreshToken: string;\n secret: string;\n clientId?: 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 let headers = new HttpHeaders();\n\n headers = headers.append('Content-type', 'application/x-www-form-urlencoded; charset=utf-8');\n\n if (parameters.secret && parameters.clientId) {\n params.append('client_id', parameters.clientId);\n params.append('client_secret', parameters.secret);\n } else {\n headers = headers.append('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';\nimport { ReplaySubject, Subject } from 'rxjs';\nimport { AuthenticationEvent, AuthenticationEventType } from '@rxap/authentication';\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');\nexport const OAUTH_CLIENT_ID = new InjectionToken('OAUTH_CLIENT_ID');\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\n public readonly events$ = new ReplaySubject<AuthenticationEvent>();\n\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 @Optional()\n @Inject(OAUTH_CLIENT_ID)\n public clientId: 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: any) {\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 clientId: this.clientId ?? undefined\n }).catch(e => {\n this.events$.next({ type: AuthenticationEventType.OnAuthError });\n throw e;\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: any) {\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 this.events$.next({ type: AuthenticationEventType.OnLogout });\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 this.events$.next({ type: AuthenticationEventType.OnAuthSuccess });\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 clientId: this.clientId ?? undefined,\n });\n\n this.authenticated(response);\n\n return response;\n }\n}\n","import { ActivatedRouteSnapshot, UrlTree, Router } from '@angular/router';\nimport { Injectable } from '@angular/core';\nimport { OAuthService } from './o-auth.service';\n\n@Injectable({ providedIn: 'root' })\nexport class OAuthExtractGuard {\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: any) {\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 { ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree } 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 {\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(':enter', [\n style({ opacity: 0 }),\n animate('512ms', style({ opacity: 1 }))\n ]),\n transition(':leave', [\n style({ opacity: 1 }),\n animate('512ms', style({ opacity: 0 }))\n ])\n ])\n ],\n standalone: true,\n imports: [ RouterOutlet ]\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';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\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 standalone: true,\n imports: [ MatProgressBarModule ]\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';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { FlexModule } from '@angular/flex-layout/flex';\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 // the \"in\" style determines the \"resting\" state of the element when it is visible.\n state('in', style({ opacity: 1 })),\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 // fade out when destroyed. this could also be written as transition('void => *')\n transition(':leave', animate(300, style({ opacity: 0 })))\n ])\n ],\n standalone: true,\n imports: [ FlexModule, MatIconModule, MatButtonModule ]\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 { Router } 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>> {\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.OAuthService","i1.OAuthService"],"mappings":";;;;;;;;;;;;;;;;;;MASa,qBAAqB,GAAG,IAAI,cAAc,CACrD,uBAAuB,EACvB;AAQF,MACa,qBAAqB,CAAA;IAGhC,WAEmB,CAAA,IAAgB,EAG1B,eAAA,GAAiC,IAAI,EAAA;QAH3B,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAG1B,IAAe,CAAA,eAAA,GAAf,eAAe,CAAsB;KAC1C;AAEG,IAAA,IAAI,CAAC,UAA2C,EAAA;QACrD,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,IAAI,IAAI,CAAC,eAAe,CAAC;QAE3E,IAAI,CAAC,eAAe,EAAE;AACpB,YAAA,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;AACxD,SAAA;QAED,OAAO,IAAI,CAAC,IAAI;aACb,GAAG,CAAI,eAAe,EAAE;AACvB,YAAA,OAAO,EAAE;AACP,gBAAA,aAAa,EAAE,CAAA,OAAA,EAAU,UAAU,CAAC,WAAW,CAAE,CAAA;AAClD,aAAA;AACD,YAAA,eAAe,EAAE,UAAU,CAAC,eAAe,IAAI,IAAI;SACpD,CAAC;AACD,aAAA,SAAS,EAAE,CAAC;KAChB;8GA1BU,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAItB,UAAU,EAAA,EAAA,EAAA,KAAA,EAGV,qBAAqB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAPpB,IAAA,SAAA,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CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAP3B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cADD,MAAM,EAAA,CAAA,CAAA,EAAA;;2FACnB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;0BAI7B,MAAM;2BAAC,YAAY,CAAA;;0BAEnB,MAAM;2BAAC,MAAM,CAAA;;0BAEb,MAAM;2BAAC,4BAA4B,CAAA;;;AChBxC;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -7,10 +7,6 @@ export * from './lib/o-auth.module';
7
7
  export * from './lib/routes';
8
8
  export * from './lib/profile.resolve';
9
9
  export * from './lib/tokens';
10
- export * from './lib/container/container.component.module';
11
10
  export * from './lib/container/container.component';
12
11
  export * from './lib/loading/loading.component';
13
- export * from './lib/loading/loading.component.module';
14
12
  export * from './lib/sign-in-with-redirect/sign-in-with-redirect.component';
15
- export * from './lib/sign-in-with-redirect/sign-in-with-redirect.component.module';
16
- export * from './lib/o-auth-routing.module';
@@ -3,5 +3,5 @@ import * as i0 from "@angular/core";
3
3
  export declare class ContainerComponent {
4
4
  prepareRoute(outlet: RouterOutlet): "true" | import("@angular/router").ActivatedRoute;
5
5
  static ɵfac: i0.ɵɵFactoryDeclaration<ContainerComponent, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<ContainerComponent, "rxap-container", never, {}, {}, never, never, false, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<ContainerComponent, "rxap-container", never, {}, {}, never, never, true, never>;
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class LoadingComponent {
3
3
  static ɵfac: i0.ɵɵFactoryDeclaration<LoadingComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<LoadingComponent, "rxap-loading", never, {}, {}, never, never, false, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoadingComponent, "rxap-loading", never, {}, {}, never, never, true, never>;
5
5
  }
@@ -5,5 +5,5 @@ export declare class SignInWithRedirectComponent {
5
5
  constructor(authService: OAuthService);
6
6
  signIn(): void;
7
7
  static ɵfac: i0.ɵɵFactoryDeclaration<SignInWithRedirectComponent, never>;
8
- static ɵcmp: i0.ɵɵComponentDeclaration<SignInWithRedirectComponent, "rxap-sign-in-with-redirect", never, {}, {}, never, never, false, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<SignInWithRedirectComponent, "rxap-sign-in-with-redirect", never, {}, {}, never, never, true, never>;
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rxap/oauth",
3
- "version": "16.0.0-dev.0",
3
+ "version": "16.0.0-dev.2",
4
4
  "peerDependencies": {
5
5
  "@angular-devkit/schematics": "^15.0.3",
6
6
  "@angular/animations": "^16.0.2",
@@ -14,13 +14,13 @@
14
14
  "@angular/platform-browser": "^16.0.2",
15
15
  "@angular/platform-browser-dynamic": "^16.0.2",
16
16
  "@angular/router": "^16.0.2",
17
- "@rxap/authentication": "^16.0.0-dev.0",
18
- "@rxap/config": "^16.0.0-dev.0",
19
- "@rxap/definition": "^16.0.0-dev.0",
20
- "@rxap/directives": "^16.0.0-dev.0",
21
- "@rxap/forms": "^16.0.0-dev.0",
22
- "@rxap/services": "^16.0.0-dev.0",
23
- "@rxap/utilities": "^16.0.0-dev.0",
17
+ "@rxap/authentication": "^16.0.0-dev.2",
18
+ "@rxap/config": "^16.0.0-dev.2",
19
+ "@rxap/definition": "^16.0.0-dev.2",
20
+ "@rxap/directives": "^16.0.0-dev.2",
21
+ "@rxap/forms": "^16.0.0-dev.2",
22
+ "@rxap/services": "^16.0.0-dev.2",
23
+ "@rxap/utilities": "^16.0.0-dev.1",
24
24
  "joi": "^17.6.3",
25
25
  "reflect-metadata": "^0.1.13",
26
26
  "rxjs": "^6.6.0"
@@ -60,7 +60,7 @@
60
60
  "save": "dependencies"
61
61
  },
62
62
  "dependencies": {
63
- "@rxap/schematics-utilities": "^16.0.0-dev.0",
63
+ "@rxap/schematics-utilities": "^16.0.0-dev.1",
64
64
  "tslib": "^2.3.1"
65
65
  },
66
66
  "module": "fesm2022/rxap-oauth.mjs",
@@ -13,5 +13,5 @@ export declare class ContinueComponent<Profile extends Record<string, any> = Rec
13
13
  signOut(): Promise<boolean>;
14
14
  redirect(): void;
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<ContinueComponent<any>, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<ContinueComponent<any>, "rxap-continue", never, {}, {}, never, never, false, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<ContinueComponent<any>, "rxap-continue", never, {}, {}, never, never, true, never>;
17
17
  }
@@ -3,5 +3,5 @@ export declare class ErrorComponent {
3
3
  get topLevelDomain(): string;
4
4
  get mainApplicationUrl(): string;
5
5
  static ɵfac: i0.ɵɵFactoryDeclaration<ErrorComponent, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<ErrorComponent, "rxap-error", never, {}, {}, never, never, false, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<ErrorComponent, "rxap-error", never, {}, {}, never, never, true, never>;
7
7
  }
@@ -1,14 +1,11 @@
1
1
  import { ModuleWithProviders } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
- import * as i1 from "./continue/continue.component.module";
4
- import * as i2 from "@rxap/oauth";
5
- import * as i3 from "./error/error.component.module";
6
3
  export interface OAuthSingleSignOnOptions {
7
4
  redirectContinueDisabled?: boolean;
8
5
  }
9
6
  export declare class OAuthSingleSignOnRoutingModule {
10
7
  static forRouting(options?: OAuthSingleSignOnOptions): ModuleWithProviders<OAuthSingleSignOnRoutingModule>;
11
8
  static ɵfac: i0.ɵɵFactoryDeclaration<OAuthSingleSignOnRoutingModule, never>;
12
- static ɵmod: i0.ɵɵNgModuleDeclaration<OAuthSingleSignOnRoutingModule, never, never, [typeof i1.ContinueComponentModule, typeof i2.LoadingComponentModule, typeof i2.ContainerComponentModule, typeof i3.ErrorComponentModule]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<OAuthSingleSignOnRoutingModule, never, never, never>;
13
10
  static ɵinj: i0.ɵɵInjectorDeclaration<OAuthSingleSignOnRoutingModule>;
14
11
  }