@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.component.js","sourceRoot":"","sources":["../../../../../../../libs/oauth/single-sign-on/src/lib/error/error.component.ts","../../../../../../../libs/oauth/single-sign-on/src/lib/error/error.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACV,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,OAAO,EACP,KAAK,EACL,KAAK,EACL,UAAU,EACV,OAAO,EACR,MAAM,qBAAqB,CAAC;;;;AAqB7B,MAAM,OAAO,cAAc;IAEzB,IAAW,cAAc;QACvB,
|
|
1
|
+
{"version":3,"file":"error.component.js","sourceRoot":"","sources":["../../../../../../../libs/oauth/single-sign-on/src/lib/error/error.component.ts","../../../../../../../libs/oauth/single-sign-on/src/lib/error/error.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACV,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,OAAO,EACP,KAAK,EACL,KAAK,EACL,UAAU,EACV,OAAO,EACR,MAAM,qBAAqB,CAAC;;;;AAqB7B,MAAM,OAAO,cAAc;IAEzB,IAAW,cAAc;QACvB,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACzD,IAAI,KAAK,EAAE;YACT,OAAO,KAAK,CAAE,CAAC,CAAE,CAAC;SACnB;aAAM;YACL,OAAO,QAAQ,CAAC,QAAQ,CAAC;SAC1B;IACH,CAAC;IAED,IAAW,kBAAkB;QAC3B,OAAO,GAAG,QAAQ,CAAC,QAAQ,KAAK,IAAI,CAAC,cAAc,EAAE,CAAC;IACxD,CAAC;;4GAbU,cAAc;gGAAd,cAAc,0FC/B3B,krBAkBA,moEDAmB;QACf,OAAO,CAAC,eAAe,EAAE;YACvB,mFAAmF;YACnF,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;YAElC,8EAA8E;YAC9E,UAAU,CAAC,QAAQ,EAAE,CAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAE,CAAC;YAE7D,iFAAiF;YACjF,UAAU,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;SAC1D,CAAC;KACH;4FAEU,cAAc;kBAnB1B,SAAS;mBAAC;oBACT,QAAQ,EAAS,YAAY;oBAC7B,WAAW,EAAM,wBAAwB;oBACzC,SAAS,EAAQ,CAAE,wBAAwB,CAAE;oBAC7C,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,IAAI,EAAa,EAAE,KAAK,EAAE,YAAY,EAAE;oBACxC,UAAU,EAAO;wBACf,OAAO,CAAC,eAAe,EAAE;4BACvB,mFAAmF;4BACnF,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;4BAElC,8EAA8E;4BAC9E,UAAU,CAAC,QAAQ,EAAE,CAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAE,CAAC;4BAE7D,iFAAiF;4BACjF,UAAU,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;yBAC1D,CAAC;qBACH;iBACF","sourcesContent":["import {\n ChangeDetectionStrategy,\n Component\n} from '@angular/core';\nimport {\n animate,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\n\n@Component({\n selector: 'rxap-error',\n templateUrl: './error.component.html',\n styleUrls: [ './error.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'rxap-error' },\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\n // fade in when created. this could also be written as transition('void => *')\n transition(':enter', [ style({ opacity: 0 }), 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})\nexport class ErrorComponent {\n\n public get topLevelDomain() {\n const match = location.hostname.match(/([^.]+\\.[^.]+$)/);\n if (match) {\n return match[ 0 ];\n } else {\n return location.hostname;\n }\n }\n\n public get mainApplicationUrl() {\n return `${location.protocol}//${this.topLevelDomain}`;\n }\n\n}\n","<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\"\n fxLayoutGap=\"32px\">\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\" fxLayoutGap=\"8px\">\n\n <h2 i18n=\"@@rxap-oauth.single-sign-on.error.title\">Error</h2>\n <p i18n=\"@@rxap-oauth.single-sign-on.error.message\">Please open the main application again.</p>\n <a [href]=\"mainApplicationUrl\" color=\"primary\" mat-raised-button>\n <ng-container i18n=\"@@rxap-oauth.single-sign-on.error.action\">Navigate to main application</ng-container>\n </a>\n\n </div>\n\n </div>\n\n</div>\n"]}
|
|
@@ -5,14 +5,14 @@ import { MatButtonModule } from '@angular/material/button';
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export class ErrorComponentModule {
|
|
7
7
|
}
|
|
8
|
-
ErrorComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
9
|
-
ErrorComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.
|
|
8
|
+
ErrorComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ErrorComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
9
|
+
ErrorComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ErrorComponentModule, declarations: [ErrorComponent], imports: [FlexLayoutModule,
|
|
10
10
|
MatButtonModule], exports: [ErrorComponent] });
|
|
11
|
-
ErrorComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.
|
|
11
|
+
ErrorComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ErrorComponentModule, imports: [[
|
|
12
12
|
FlexLayoutModule,
|
|
13
13
|
MatButtonModule
|
|
14
14
|
]] });
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ErrorComponentModule, decorators: [{
|
|
16
16
|
type: NgModule,
|
|
17
17
|
args: [{
|
|
18
18
|
declarations: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.component.module.js","sourceRoot":"","sources":["../../../../../../../libs/oauth/single-sign-on/src/lib/error/error.component.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;;AAe3D,MAAM,OAAO,oBAAoB;;
|
|
1
|
+
{"version":3,"file":"error.component.module.js","sourceRoot":"","sources":["../../../../../../../libs/oauth/single-sign-on/src/lib/error/error.component.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;;AAe3D,MAAM,OAAO,oBAAoB;;kHAApB,oBAAoB;mHAApB,oBAAoB,iBAV7B,cAAc,aAGd,gBAAgB;QAChB,eAAe,aAGf,cAAc;mHAGL,oBAAoB,YARjB;YACZ,gBAAgB;YAChB,eAAe;SAChB;4FAKU,oBAAoB;kBAZhC,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,cAAc;qBACf;oBACD,OAAO,EAAO;wBACZ,gBAAgB;wBAChB,eAAe;qBAChB;oBACD,OAAO,EAAO;wBACZ,cAAc;qBACf;iBACF","sourcesContent":["import { NgModule } from '@angular/core';\nimport { ErrorComponent } from './error.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MatButtonModule } from '@angular/material/button';\n\n\n@NgModule({\n declarations: [\n ErrorComponent\n ],\n imports: [\n FlexLayoutModule,\n MatButtonModule\n ],\n exports: [\n ErrorComponent\n ]\n})\nexport class ErrorComponentModule {}\n"]}
|
|
@@ -22,18 +22,18 @@ export class OAuthSingleSignOnRoutingModule {
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
OAuthSingleSignOnRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
26
|
-
OAuthSingleSignOnRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.
|
|
25
|
+
OAuthSingleSignOnRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
26
|
+
OAuthSingleSignOnRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnRoutingModule, exports: [ContinueComponentModule,
|
|
27
27
|
LoadingComponentModule,
|
|
28
28
|
ContainerComponentModule,
|
|
29
29
|
ErrorComponentModule] });
|
|
30
|
-
OAuthSingleSignOnRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.
|
|
30
|
+
OAuthSingleSignOnRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnRoutingModule, providers: [
|
|
31
31
|
OAuthSingleSignOnGuard
|
|
32
32
|
], imports: [ContinueComponentModule,
|
|
33
33
|
LoadingComponentModule,
|
|
34
34
|
ContainerComponentModule,
|
|
35
35
|
ErrorComponentModule] });
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnRoutingModule, decorators: [{
|
|
37
37
|
type: NgModule,
|
|
38
38
|
args: [{
|
|
39
39
|
exports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o-auth-single-sign-on-routing.module.js","sourceRoot":"","sources":["../../../../../../libs/oauth/single-sign-on/src/lib/o-auth-single-sign-on-routing.module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAGT,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,0CAA0C,EAAE,MAAM,UAAU,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;;AAiBtE,MAAM,OAAO,8BAA8B;IAElC,MAAM,CAAC,UAAU,CAAC,UAAoC,EAAE;QAC7D,MAAM,SAAS,GAAe;YAC5B,sBAAsB;SACvB,CAAC;QACF,IAAI,OAAO,CAAC,wBAAwB,EAAE;YACpC,SAAS,CAAC,IAAI,CAAC;gBACb,OAAO,EAAG,0CAA0C;gBACpD,QAAQ,EAAE,OAAO,CAAC,wBAAwB;aAC3C,CAAC,CAAC;SACJ;QACD,OAAO;YACL,QAAQ,EAAE,8BAA8B;YACxC,SAAS;SACV,CAAC;IACJ,CAAC;;
|
|
1
|
+
{"version":3,"file":"o-auth-single-sign-on-routing.module.js","sourceRoot":"","sources":["../../../../../../libs/oauth/single-sign-on/src/lib/o-auth-single-sign-on-routing.module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAGT,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,0CAA0C,EAAE,MAAM,UAAU,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;;AAiBtE,MAAM,OAAO,8BAA8B;IAElC,MAAM,CAAC,UAAU,CAAC,UAAoC,EAAE;QAC7D,MAAM,SAAS,GAAe;YAC5B,sBAAsB;SACvB,CAAC;QACF,IAAI,OAAO,CAAC,wBAAwB,EAAE;YACpC,SAAS,CAAC,IAAI,CAAC;gBACb,OAAO,EAAG,0CAA0C;gBACpD,QAAQ,EAAE,OAAO,CAAC,wBAAwB;aAC3C,CAAC,CAAC;SACJ;QACD,OAAO;YACL,QAAQ,EAAE,8BAA8B;YACxC,SAAS;SACV,CAAC;IACJ,CAAC;;4HAhBU,8BAA8B;6HAA9B,8BAA8B,YATvC,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,oBAAoB;6HAMX,8BAA8B,aAJ9B;QACT,sBAAsB;KACvB,YAPC,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,oBAAoB;4FAMX,8BAA8B;kBAX1C,QAAQ;mBAAC;oBACR,OAAO,EAAE;wBACP,uBAAuB;wBACvB,sBAAsB;wBACtB,wBAAwB;wBACxB,oBAAoB;qBACrB;oBACD,SAAS,EAAE;wBACT,sBAAsB;qBACvB;iBACF","sourcesContent":["import {\n NgModule,\n ModuleWithProviders,\n Provider\n} from '@angular/core';\nimport {\n ContainerComponentModule,\n LoadingComponentModule\n} from '@rxap/oauth';\nimport { ContinueComponentModule } from './continue/continue.component.module';\nimport { RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED } from './tokens';\nimport { OAuthSingleSignOnGuard } from './o-auth-single-sign-on.guard';\nimport { ErrorComponentModule } from './error/error.component.module';\n\nexport interface OAuthSingleSignOnOptions {\n redirectContinueDisabled?: boolean\n}\n\n@NgModule({\n exports: [\n ContinueComponentModule,\n LoadingComponentModule,\n ContainerComponentModule,\n ErrorComponentModule\n ],\n providers: [\n OAuthSingleSignOnGuard\n ]\n})\nexport class OAuthSingleSignOnRoutingModule {\n\n public static forRouting(options: OAuthSingleSignOnOptions = {}): ModuleWithProviders<OAuthSingleSignOnRoutingModule> {\n const providers: Provider[] = [\n OAuthSingleSignOnGuard\n ];\n if (options.redirectContinueDisabled) {\n providers.push({\n provide: RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED,\n useValue: options.redirectContinueDisabled\n });\n }\n return {\n ngModule: OAuthSingleSignOnRoutingModule,\n providers\n };\n }\n\n}\n"]}
|
|
@@ -47,9 +47,9 @@ export class OAuthSingleSignOnGuard {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
OAuthSingleSignOnGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
51
|
-
OAuthSingleSignOnGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
50
|
+
OAuthSingleSignOnGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnGuard, deps: [{ token: OAuthService }, { token: Router }, { token: RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE }, { token: RXAP_O_AUTH_REDIRECT_SIGN_IN }, { token: RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
51
|
+
OAuthSingleSignOnGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnGuard });
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnGuard, decorators: [{
|
|
53
53
|
type: Injectable
|
|
54
54
|
}], ctorParameters: function () { return [{ type: i1.OAuthSingleSignOnService, decorators: [{
|
|
55
55
|
type: Inject,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o-auth-single-sign-on.guard.js","sourceRoot":"","sources":["../../../../../../libs/oauth/single-sign-on/src/lib/o-auth-single-sign-on.guard.ts"],"names":[],"mappings":";AAAA,OAAO,EAGL,MAAM,EAEP,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,MAAM,EACN,UAAU,EACV,QAAQ,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EACL,YAAY,EACZ,4BAA4B,EAC7B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,4CAA4C,EAC5C,0CAA0C,EAC3C,MAAM,UAAU,CAAC;;;;AAGlB,MAAM,OAAO,sBAAsB;IAEjC,YAEmB,cAAwC,EAExC,MAAc,EAEd,gBAA0B,EAE1B,aAAuB,EAGvB,wBAAwC;QATxC,mBAAc,GAAd,cAAc,CAA0B;QAExC,WAAM,GAAN,MAAM,CAAQ;QAEd,qBAAgB,GAAhB,gBAAgB,CAAU;QAE1B,kBAAa,GAAb,aAAa,CAAU;QAGvB,6BAAwB,GAAxB,wBAAwB,CAAgB;IAE3D,CAAC;IAEY,WAAW,CAAC,KAA6B;;YAEpD,MAAM,QAAQ,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACrD,MAAM,MAAM,GAAK,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACnD,MAAM,OAAO,GAAI,K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AAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC9C,IAAI,CAAC,cAAc,CAAC,OAAO,GAAI,OAAO,CAAC;YACvC,IAAI,CAAC,cAAc,CAAC,MAAM,GAAK,MAAM,CAAC;YAEtC,IAAI,MAAM,EAAE;gBACV,IAAI,MAAM,KAAK,SAAS,EAAE;oBACxB,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;oBACpC,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;iBACtD;aACF;YAED,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE,CAAC;YAEpE,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;YAEhD,IAAI,eAAe,EAAE;gBACnB,IAAI,IAAI,CAAC,wBAAwB,EAAE;oBACjC,IAAI,CAAC,cAAc,CAAC,gBAAgB,EAAE,CAAC;oBACvC,OAAO,IAAI,CAAC;iBACb;gBACD,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;aACzD;YAED,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACvD,CAAC;KAAA;;oHArDU,sBAAsB,kBAGvB,YAAY,aAEZ,MAAM,aAEN,4CAA4C,aAE5C,4BAA4B,aAG5B,0CAA0C;wHAZzC,sBAAsB;4FAAtB,sBAAsB;kBADlC,UAAU;;0BAIN,MAAM;2BAAC,YAAY;;0BAEnB,MAAM;2BAAC,MAAM;;0BAEb,MAAM;2BAAC,4CAA4C;;0BAEnD,MAAM;2BAAC,4BAA4B;;0BAEnC,QAAQ;;0BACR,MAAM;2BAAC,0CAA0C","sourcesContent":["import {\n ActivatedRouteSnapshot,\n CanActivate,\n Router,\n UrlTree\n} from '@angular/router';\nimport {\n Inject,\n Injectable,\n Optional\n} from '@angular/core';\nimport { OAuthSingleSignOnService } from './o-auth-single-sign-on.service';\nimport {\n OAuthService,\n RXAP_O_AUTH_REDIRECT_SIGN_IN\n} from '@rxap/oauth';\nimport {\n RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE,\n RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED\n} from './tokens';\n\n@Injectable()\nexport class OAuthSingleSignOnGuard implements CanActivate {\n\n constructor(\n @Inject(OAuthService)\n private readonly authentication: OAuthSingleSignOnService,\n @Inject(Router)\n private readonly router: Router,\n @Inject(RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE)\n private readonly redirectContinue: string[],\n @Inject(RXAP_O_AUTH_REDIRECT_SIGN_IN)\n private readonly redirectLogin: string[],\n @Optional()\n @Inject(RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED)\n private readonly redirectContinueDisabled: boolean | null\n ) {\n }\n\n public async canActivate(route: ActivatedRouteSnapshot): Promise<boolean | UrlTree> {\n\n const redirect = route.queryParamMap.get('redirect');\n const secret = route.queryParamMap.get('secret');\n const payload = route.queryParamMap.get('payload');\n const action = route.queryParamMap.get('action');\n\n if (!redirect || !secret) {\n console.warn(`The query params 'redirect' or 'secret' is not defined!`);\n return this.router.createUrlTree([ 'error' ]);\n }\n\n this.authentication.redirect = atob(redirect);\n this.authentication.payload = payload;\n this.authentication.secret = secret;\n\n if (action) {\n if (action === 'signOut') {\n await this.authentication.signOut();\n return this.router.createUrlTree(this.redirectLogin);\n }\n }\n\n const isAuthenticated = await this.authentication.isAuthenticated();\n\n console.log('isAuthenticated', isAuthenticated);\n\n if (isAuthenticated) {\n if (this.redirectContinueDisabled) {\n this.authentication.redirectToClient();\n return true;\n }\n return this.router.createUrlTree(this.redirectContinue);\n }\n\n return this.router.createUrlTree(this.redirectLogin);\n }\n\n}\n"]}
|
|
@@ -38,9 +38,9 @@ export class OAuthSingleSignOnService extends OAuthService {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
OAuthSingleSignOnService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
42
|
-
OAuthSingleSignOnService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
41
|
+
OAuthSingleSignOnService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnService, 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 });
|
|
42
|
+
OAuthSingleSignOnService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnService });
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnService, decorators: [{
|
|
44
44
|
type: Injectable
|
|
45
45
|
}], ctorParameters: function () { return [{ type: i1.OAuthMethod, decorators: [{
|
|
46
46
|
type: Inject,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o-auth-single-sign-on.service.js","sourceRoot":"","sources":["../../../../../../libs/oauth/single-sign-on/src/lib/o-auth-single-sign-on.service.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,YAAY,EAEZ,WAAW,EACX,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,6BAA6B,EAC7B,wBAAwB,EACzB,MAAM,aAAa,CAAC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IAAI,CAAC;YAC7B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;QAChC,CAAC;KAAA;;
|
|
1
|
+
{"version":3,"file":"o-auth-single-sign-on.service.js","sourceRoot":"","sources":["../../../../../../libs/oauth/single-sign-on/src/lib/o-auth-single-sign-on.service.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,YAAY,EAEZ,WAAW,EACX,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,6BAA6B,EAC7B,wBAAwB,EACzB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,UAAU,EACV,MAAM,EACN,QAAQ,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;;;;AAGzC,MAAM,OAAO,wBAAyB,SAAQ,YAAY;IAKxD,8DAA8D;IAC9D,gEAAgE;IAChE,gEAAgE;IAChE,6CAA6C;IAC7C,YAEI,WAAwB,EAExB,qBAA4C,EAE5C,MAAc,EAGd,kBAAiC,IAAI,EAGrC,eAAmC,IAAI,EAGvC,SAAmC,IAAI,EAGvC,SAAmC,IAAI,EAGvC,kBAAmC,IAAI,EAGvC,cAAmC,IAAI;QAEzC,KAAK,CAAC,WAAW,EAAE,qBAAqB,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,CAAC,CAAC;QAjC1H,YAAO,GAAmB,IAAI,CAAC;QAC/B,aAAQ,GAAkB,IAAI,CAAC;IAiCtC,CAAC;IAEY,0BAA0B,CACrC,KAAa,EACb,QAAgB,EAChB,QAAiB;;;;;YAEjB,MAAM,QAAQ,GAAG,MAAM,OAAM,0BAA0B,YAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;YACnF,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACxB,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;IAEM,gBAAgB;QACrB,MAAM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,\n Inject,\n Optional\n} from '@angular/core';\nimport { Router } from '@angular/router';\n\n@Injectable()\nexport class OAuthSingleSignOnService extends OAuthService {\n\n public payload: string | null = null;\n public redirect: string | null = null;\n\n // It is required to define the constructor with the injection\n // definition. If not defined the constructor will be created by\n // typescript without an parameters, bc the payload and redirect\n // initialization is done in the constructor.\n constructor(\n @Inject(OAuthMethod)\n oAuthMethod: OAuthMethod,\n @Inject(GetOAuthProfileMethod)\n getOAuthProfileMethod: GetOAuthProfileMethod,\n @Inject(Router)\n router: Router,\n @Optional()\n @Inject(PROFILE_AUTH_ENDPOINT)\n profileEndpoint: string | null = null,\n @Optional()\n @Inject(OAUTH_AUTH_ENDPOINT)\n authEndpoint: string | null = null,\n @Optional()\n @Inject(OAUTH_SECRET)\n secret: string | null = null,\n @Optional()\n @Inject(OAUTH_SSO_URL)\n ssoUrl: string | null = null,\n @Optional()\n @Inject(RXAP_O_AUTH_REDIRECT_SIGN_OUT)\n redirectSignOut: string[] | null = null,\n @Optional()\n @Inject(RXAP_O_AUTH_REDIRECT_URL)\n redirectUrl: string | null = null\n ) {\n super(oAuthMethod, getOAuthProfileMethod, router, profileEndpoint, authEndpoint, secret, ssoUrl, redirectSignOut, redirectUrl);\n }\n\n public async signInWithEmailAndPassword(\n email: string,\n password: string,\n remember: boolean\n ): Promise<OAuthMethodResponse> {\n const response = await super.signInWithEmailAndPassword(email, password, remember);\n this.redirectToClient();\n return response;\n }\n\n public redirectToClient() {\n window.location.replace(`${this.redirect}?accessToken=${this.accessToken}&refreshToken=${this.refreshToken}&expiresIn=${this.expiresIn}&payload=${this.payload}`);\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 }\n\n}\n"]}
|
|
@@ -50,9 +50,9 @@ class OAuthSingleSignOnService extends OAuthService {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
OAuthSingleSignOnService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
54
|
-
OAuthSingleSignOnService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
53
|
+
OAuthSingleSignOnService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnService, 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 });
|
|
54
|
+
OAuthSingleSignOnService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnService });
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnService, decorators: [{
|
|
56
56
|
type: Injectable
|
|
57
57
|
}], ctorParameters: function () { return [{ type: i1.OAuthMethod, decorators: [{
|
|
58
58
|
type: Inject,
|
|
@@ -115,8 +115,8 @@ class ContinueComponent {
|
|
|
115
115
|
this.oAuthService.redirectToClient();
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
ContinueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
119
|
-
ContinueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.
|
|
118
|
+
ContinueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContinueComponent, deps: [{ token: ActivatedRoute }, { token: Router }, { token: OAuthService }, { token: RXAP_O_AUTH_REDIRECT_SIGN_IN }], target: i0.ɵɵFactoryTarget.Component });
|
|
119
|
+
ContinueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContinueComponent, selector: "rxap-continue", host: { classAttribute: "rxap-continue" }, ngImport: i0, template: "<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\"\n fxLayoutGap=\"32px\">\n\n <div class=\"header\" fxFlex=\"nogrow\" fxLayout=\"column\" fxLayoutAlign=\"center center\">\n\n <div *ngIf=\"profile | async as p\" [name]=\"p.username\" [rxapAvatarBackgroundImage]=\"p.username\"\n class=\"avatar-icon\"></div>\n\n </div>\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\">\n\n <p><span i18n>Currently Sign In as:</span> <span class=\"username\"><br>{{(profile | async)?.username}}</span></p>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"8px\">\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"redirect()\" color=\"primary\" i18n mat-raised-button>Continue</button>\n </div>\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"signOut()\" color=\"accent\" i18n mat-stroked-button>Change Account</button>\n </div>\n\n </div>\n\n </div>\n\n</div>\n", styles: [".inner{padding:64px;position:relative}.inner .header .avatar-icon{width:100px;height:100px;font-size:100px;border-radius:100%}.inner .content .email-input,.inner .content .password-input{width:320px}.inner .content .email-input .prefix-icon,.inner .content .password-input .prefix-icon{width:24px;height:24px;display:flex;justify-content:center;align-items:center}.inner .content .email-input ::ng-deep .mat-form-field-prefix,.inner .content .password-input ::ng-deep .mat-form-field-prefix{align-self:flex-end;margin:4px}.inner .content [type=submit]{width:128px;text-transform:uppercase}.inner .loading-bar{position:absolute;bottom:0;left:0;right:0;top:auto}"], components: [{ type: i1$1.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: 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"] }, { 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"] }, { 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"] }, { 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"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.AvatarBackgroundImageDirective, selector: "[rxapAvatarBackgroundImage]", inputs: ["name", "rxapAvatarBackgroundImage"] }], pipes: { "async": i3.AsyncPipe }, animations: [
|
|
120
120
|
trigger('fadeAnimation', [
|
|
121
121
|
// the "in" style determines the "resting" state of the element when it is visible.
|
|
122
122
|
state('in', style({ opacity: 1 })),
|
|
@@ -126,7 +126,7 @@ ContinueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
126
126
|
transition(':leave', animate(300, style({ opacity: 0 }))),
|
|
127
127
|
]),
|
|
128
128
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContinueComponent, decorators: [{
|
|
130
130
|
type: Component,
|
|
131
131
|
args: [{
|
|
132
132
|
selector: 'rxap-continue',
|
|
@@ -161,20 +161,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
161
161
|
|
|
162
162
|
class ContinueComponentModule {
|
|
163
163
|
}
|
|
164
|
-
ContinueComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
165
|
-
ContinueComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.
|
|
164
|
+
ContinueComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContinueComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
165
|
+
ContinueComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContinueComponentModule, declarations: [ContinueComponent], imports: [FlexLayoutModule,
|
|
166
166
|
MatIconModule,
|
|
167
167
|
MatButtonModule,
|
|
168
168
|
CommonModule,
|
|
169
169
|
AvatarBackgroundImageDirectiveModule], exports: [ContinueComponent] });
|
|
170
|
-
ContinueComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.
|
|
170
|
+
ContinueComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContinueComponentModule, imports: [[
|
|
171
171
|
FlexLayoutModule,
|
|
172
172
|
MatIconModule,
|
|
173
173
|
MatButtonModule,
|
|
174
174
|
CommonModule,
|
|
175
175
|
AvatarBackgroundImageDirectiveModule
|
|
176
176
|
]] });
|
|
177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContinueComponentModule, decorators: [{
|
|
178
178
|
type: NgModule,
|
|
179
179
|
args: [{
|
|
180
180
|
declarations: [
|
|
@@ -242,9 +242,9 @@ class OAuthSingleSignOnGuard {
|
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
OAuthSingleSignOnGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
246
|
-
OAuthSingleSignOnGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.
|
|
247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
245
|
+
OAuthSingleSignOnGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnGuard, deps: [{ token: OAuthService }, { token: Router }, { token: RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE }, { token: RXAP_O_AUTH_REDIRECT_SIGN_IN }, { token: RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
246
|
+
OAuthSingleSignOnGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnGuard });
|
|
247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnGuard, decorators: [{
|
|
248
248
|
type: Injectable
|
|
249
249
|
}], ctorParameters: function () { return [{ type: OAuthSingleSignOnService, decorators: [{
|
|
250
250
|
type: Inject,
|
|
@@ -267,14 +267,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
267
267
|
|
|
268
268
|
class ErrorComponent {
|
|
269
269
|
get topLevelDomain() {
|
|
270
|
-
|
|
270
|
+
const match = location.hostname.match(/([^.]+\.[^.]+$)/);
|
|
271
|
+
if (match) {
|
|
272
|
+
return match[0];
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
return location.hostname;
|
|
276
|
+
}
|
|
271
277
|
}
|
|
272
278
|
get mainApplicationUrl() {
|
|
273
279
|
return `${location.protocol}//${this.topLevelDomain}`;
|
|
274
280
|
}
|
|
275
281
|
}
|
|
276
|
-
ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
277
|
-
ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.
|
|
282
|
+
ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
283
|
+
ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ErrorComponent, selector: "rxap-error", host: { classAttribute: "rxap-error" }, ngImport: i0, template: "<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\"\n fxLayoutGap=\"32px\">\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\" fxLayoutGap=\"8px\">\n\n <h2 i18n=\"@@rxap-oauth.single-sign-on.error.title\">Error</h2>\n <p i18n=\"@@rxap-oauth.single-sign-on.error.message\">Please open the main application again.</p>\n <a [href]=\"mainApplicationUrl\" color=\"primary\" mat-raised-button>\n <ng-container i18n=\"@@rxap-oauth.single-sign-on.error.action\">Navigate to main application</ng-container>\n </a>\n\n </div>\n\n </div>\n\n</div>\n", styles: [".inner{padding:64px;position:relative}"], components: [{ type: i1$1.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }], directives: [{ 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"] }, { 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"] }, { 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"] }], animations: [
|
|
278
284
|
trigger('fadeAnimation', [
|
|
279
285
|
// the "in" style determines the "resting" state of the element when it is visible.
|
|
280
286
|
state('in', style({ opacity: 1 })),
|
|
@@ -284,7 +290,7 @@ ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
|
|
|
284
290
|
transition(':leave', animate(300, style({ opacity: 0 })))
|
|
285
291
|
])
|
|
286
292
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
287
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ErrorComponent, decorators: [{
|
|
288
294
|
type: Component,
|
|
289
295
|
args: [{
|
|
290
296
|
selector: 'rxap-error',
|
|
@@ -307,14 +313,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
307
313
|
|
|
308
314
|
class ErrorComponentModule {
|
|
309
315
|
}
|
|
310
|
-
ErrorComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
311
|
-
ErrorComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.
|
|
316
|
+
ErrorComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ErrorComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
317
|
+
ErrorComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ErrorComponentModule, declarations: [ErrorComponent], imports: [FlexLayoutModule,
|
|
312
318
|
MatButtonModule], exports: [ErrorComponent] });
|
|
313
|
-
ErrorComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.
|
|
319
|
+
ErrorComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ErrorComponentModule, imports: [[
|
|
314
320
|
FlexLayoutModule,
|
|
315
321
|
MatButtonModule
|
|
316
322
|
]] });
|
|
317
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
323
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ErrorComponentModule, decorators: [{
|
|
318
324
|
type: NgModule,
|
|
319
325
|
args: [{
|
|
320
326
|
declarations: [
|
|
@@ -347,18 +353,18 @@ class OAuthSingleSignOnRoutingModule {
|
|
|
347
353
|
};
|
|
348
354
|
}
|
|
349
355
|
}
|
|
350
|
-
OAuthSingleSignOnRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.
|
|
351
|
-
OAuthSingleSignOnRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.
|
|
356
|
+
OAuthSingleSignOnRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
357
|
+
OAuthSingleSignOnRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnRoutingModule, exports: [ContinueComponentModule,
|
|
352
358
|
LoadingComponentModule,
|
|
353
359
|
ContainerComponentModule,
|
|
354
360
|
ErrorComponentModule] });
|
|
355
|
-
OAuthSingleSignOnRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.
|
|
361
|
+
OAuthSingleSignOnRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnRoutingModule, providers: [
|
|
356
362
|
OAuthSingleSignOnGuard
|
|
357
363
|
], imports: [ContinueComponentModule,
|
|
358
364
|
LoadingComponentModule,
|
|
359
365
|
ContainerComponentModule,
|
|
360
366
|
ErrorComponentModule] });
|
|
361
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.
|
|
367
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: OAuthSingleSignOnRoutingModule, decorators: [{
|
|
362
368
|
type: NgModule,
|
|
363
369
|
args: [{
|
|
364
370
|
exports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-oauth-single-sign-on.js","sources":["../../../../libs/oauth/single-sign-on/src/lib/o-auth-single-sign-on.service.ts","../../../../libs/oauth/single-sign-on/src/lib/continue/continue.component.ts","../../../../libs/oauth/single-sign-on/src/lib/continue/continue.component.html","../../../../libs/oauth/single-sign-on/src/lib/continue/continue.component.module.ts","../../../../libs/oauth/single-sign-on/src/lib/tokens.ts","../../../../libs/oauth/single-sign-on/src/lib/o-auth-single-sign-on.guard.ts","../../../../libs/oauth/single-sign-on/src/lib/error/error.component.ts","../../../../libs/oauth/single-sign-on/src/lib/error/error.component.html","../../../../libs/oauth/single-sign-on/src/lib/error/error.component.module.ts","../../../../libs/oauth/single-sign-on/src/lib/o-auth-single-sign-on-routing.module.ts","../../../../libs/oauth/single-sign-on/src/lib/routes.ts","../../../../libs/oauth/single-sign-on/src/rxap-oauth-single-sign-on.ts"],"sourcesContent":["import {\n OAuthService,\n OAuthMethodResponse,\n OAuthMethod,\n GetOAuthProfileMethod,\n PROFILE_AUTH_ENDPOINT,\n OAUTH_AUTH_ENDPOINT,\n OAUTH_SECRET,\n OAUTH_SSO_URL,\n RXAP_O_AUTH_REDIRECT_SIGN_OUT,\n RXAP_O_AUTH_REDIRECT_URL\n} from '@rxap/oauth';\nimport {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport { Router } from '@angular/router';\n\n@Injectable()\nexport class OAuthSingleSignOnService extends OAuthService {\n\n public payload: string | null = null;\n public redirect: string | null = null;\n\n // It is required to define the constructor with the injection\n // definition. If not defined the constructor will be created by\n // typescript without an parameters, bc the payload and redirect\n // initialization is done in the constructor.\n constructor(\n @Inject(OAuthMethod)\n oAuthMethod: OAuthMethod,\n @Inject(GetOAuthProfileMethod)\n getOAuthProfileMethod: GetOAuthProfileMethod,\n @Inject(Router)\n router: Router,\n @Optional()\n @Inject(PROFILE_AUTH_ENDPOINT)\n profileEndpoint: string | null = null,\n @Optional()\n @Inject(OAUTH_AUTH_ENDPOINT)\n authEndpoint: string | null = null,\n @Optional()\n @Inject(OAUTH_SECRET)\n secret: string | null = null,\n @Optional()\n @Inject(OAUTH_SSO_URL)\n ssoUrl: string | null = null,\n @Optional()\n @Inject(RXAP_O_AUTH_REDIRECT_SIGN_OUT)\n redirectSignOut: string[] | null = null,\n @Optional()\n @Inject(RXAP_O_AUTH_REDIRECT_URL)\n redirectUrl: string | null = null\n ) {\n super(oAuthMethod, getOAuthProfileMethod, router, profileEndpoint, authEndpoint, secret, ssoUrl, redirectSignOut, redirectUrl);\n }\n\n public async signInWithEmailAndPassword(\n email: string,\n password: string,\n remember: boolean\n ): Promise<OAuthMethodResponse> {\n const response = await super.signInWithEmailAndPassword(email, password, remember);\n this.redirectToClient();\n return response;\n }\n\n public redirectToClient() {\n window.location.replace(`${this.redirect}?accessToken=${this.accessToken}&refreshToken=${this.refreshToken}&expiresIn=${this.expiresIn}&payload=${this.payload}`);\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 }\n\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n OnInit\n} from '@angular/core';\nimport {\n animate,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\nimport {\n ActivatedRoute,\n Router\n} from '@angular/router';\nimport {\n map,\n take\n} from 'rxjs/operators';\nimport { OAuthSingleSignOnService } from '../o-auth-single-sign-on.service';\nimport {\n RXAP_O_AUTH_REDIRECT_SIGN_IN,\n OAuthService\n} from '@rxap/oauth';\n\n@Component({\n selector: 'rxap-continue',\n templateUrl: './continue.component.html',\n styleUrls: [ './continue.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'rxap-continue' },\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\n // fade in when created. this could also be written as transition('void => *')\n transition(':enter', [style({ opacity: 0 }), 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})\nexport class ContinueComponent<\n Profile extends Record<string, any> = Record<string, any>\n> implements OnInit\n{\n public profile!: Promise<Profile>;\n\n constructor(\n @Inject(ActivatedRoute)\n private readonly route: ActivatedRoute,\n @Inject(Router)\n private readonly router: Router,\n @Inject(OAuthService)\n private readonly oAuthService: OAuthSingleSignOnService,\n @Inject(RXAP_O_AUTH_REDIRECT_SIGN_IN)\n private readonly redirectLogin: string[]\n ) {}\n\n public ngOnInit() {\n this.profile = this.route.data\n .pipe(\n take(1),\n map((data) => data.profile)\n )\n .toPromise();\n }\n\n signOut() {\n this.oAuthService.signOut();\n return this.router.navigate(this.redirectLogin);\n }\n\n redirect() {\n this.oAuthService.redirectToClient();\n }\n}\n","<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\"\n fxLayoutGap=\"32px\">\n\n <div class=\"header\" fxFlex=\"nogrow\" fxLayout=\"column\" fxLayoutAlign=\"center center\">\n\n <div *ngIf=\"profile | async as p\" [name]=\"p.username\" [rxapAvatarBackgroundImage]=\"p.username\"\n class=\"avatar-icon\"></div>\n\n </div>\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\">\n\n <p><span i18n>Currently Sign In as:</span> <span class=\"username\"><br>{{(profile | async)?.username}}</span></p>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"8px\">\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"redirect()\" color=\"primary\" i18n mat-raised-button>Continue</button>\n </div>\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"signOut()\" color=\"accent\" i18n mat-stroked-button>Change Account</button>\n </div>\n\n </div>\n\n </div>\n\n</div>\n","import { NgModule } from '@angular/core';\nimport { ContinueComponent } from './continue.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { CommonModule } from '@angular/common';\nimport { AvatarBackgroundImageDirectiveModule } from '@rxap/directives';\n\n\n@NgModule({\n declarations: [\n ContinueComponent\n ],\n imports: [\n FlexLayoutModule,\n MatIconModule,\n MatButtonModule,\n CommonModule,\n AvatarBackgroundImageDirectiveModule\n ],\n exports: [\n ContinueComponent\n ]\n})\nexport class ContinueComponentModule {\n}\n","import { InjectionToken } from '@angular/core';\n\nexport function DefaultRedirectContinueFactory(): string[] {\n return [ '/', 'continue' ];\n}\n\nexport const RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE = new InjectionToken('rxap/o-auth/single-sign-on/redirect-continue', {\n providedIn: 'root',\n factory: DefaultRedirectContinueFactory\n});\n\nexport const RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED = new InjectionToken('rxap/o-auth/single-sign-on/redirect-continue-disabled');\n","import {\n ActivatedRouteSnapshot,\n CanActivate,\n Router,\n UrlTree\n} from '@angular/router';\nimport {\n Inject,\n Injectable,\n Optional\n} from '@angular/core';\nimport { OAuthSingleSignOnService } from './o-auth-single-sign-on.service';\nimport {\n OAuthService,\n RXAP_O_AUTH_REDIRECT_SIGN_IN\n} from '@rxap/oauth';\nimport {\n RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE,\n RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED\n} from './tokens';\n\n@Injectable()\nexport class OAuthSingleSignOnGuard implements CanActivate {\n\n constructor(\n @Inject(OAuthService)\n private readonly authentication: OAuthSingleSignOnService,\n @Inject(Router)\n private readonly router: Router,\n @Inject(RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE)\n private readonly redirectContinue: string[],\n @Inject(RXAP_O_AUTH_REDIRECT_SIGN_IN)\n private readonly redirectLogin: string[],\n @Optional()\n @Inject(RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED)\n private readonly redirectContinueDisabled: boolean | null\n ) {\n }\n\n public async canActivate(route: ActivatedRouteSnapshot): Promise<boolean | UrlTree> {\n\n const redirect = route.queryParamMap.get('redirect');\n const secret = route.queryParamMap.get('secret');\n const payload = route.queryParamMap.get('payload');\n const action = route.queryParamMap.get('action');\n\n if (!redirect || !secret) {\n console.warn(`The query params 'redirect' or 'secret' is not defined!`);\n return this.router.createUrlTree([ 'error' ]);\n }\n\n this.authentication.redirect = atob(redirect);\n this.authentication.payload = payload;\n this.authentication.secret = secret;\n\n if (action) {\n if (action === 'signOut') {\n await this.authentication.signOut();\n return this.router.createUrlTree(this.redirectLogin);\n }\n }\n\n const isAuthenticated = await this.authentication.isAuthenticated();\n\n console.log('isAuthenticated', isAuthenticated);\n\n if (isAuthenticated) {\n if (this.redirectContinueDisabled) {\n this.authentication.redirectToClient();\n return true;\n }\n return this.router.createUrlTree(this.redirectContinue);\n }\n\n return this.router.createUrlTree(this.redirectLogin);\n }\n\n}\n","import {\n ChangeDetectionStrategy,\n Component\n} from '@angular/core';\nimport {\n animate,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\n\n@Component({\n selector: 'rxap-error',\n templateUrl: './error.component.html',\n styleUrls: [ './error.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'rxap-error' },\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\n // fade in when created. this could also be written as transition('void => *')\n transition(':enter', [ style({ opacity: 0 }), 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})\nexport class ErrorComponent {\n\n public get topLevelDomain() {\n return location.hostname.match(/([^.]+\\.[^.]+$)/);\n }\n\n public get mainApplicationUrl() {\n return `${location.protocol}//${this.topLevelDomain}`;\n }\n\n}\n","<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\"\n fxLayoutGap=\"32px\">\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\" fxLayoutGap=\"8px\">\n\n <h2 i18n=\"@@rxap-oauth.single-sign-on.error.title\">Error</h2>\n <p i18n=\"@@rxap-oauth.single-sign-on.error.message\">Please open the main application again.</p>\n <a [href]=\"mainApplicationUrl\" color=\"primary\" mat-raised-button>\n <ng-container i18n=\"@@rxap-oauth.single-sign-on.error.action\">Navigate to main application</ng-container>\n </a>\n\n </div>\n\n </div>\n\n</div>\n","import { NgModule } from '@angular/core';\nimport { ErrorComponent } from './error.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MatButtonModule } from '@angular/material/button';\n\n\n@NgModule({\n declarations: [\n ErrorComponent\n ],\n imports: [\n FlexLayoutModule,\n MatButtonModule\n ],\n exports: [\n ErrorComponent\n ]\n})\nexport class ErrorComponentModule {}\n","import {\n NgModule,\n ModuleWithProviders,\n Provider\n} from '@angular/core';\nimport {\n ContainerComponentModule,\n LoadingComponentModule\n} from '@rxap/oauth';\nimport { ContinueComponentModule } from './continue/continue.component.module';\nimport { RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED } from './tokens';\nimport { OAuthSingleSignOnGuard } from './o-auth-single-sign-on.guard';\nimport { ErrorComponentModule } from './error/error.component.module';\n\nexport interface OAuthSingleSignOnOptions {\n redirectContinueDisabled?: boolean\n}\n\n@NgModule({\n exports: [\n ContinueComponentModule,\n LoadingComponentModule,\n ContainerComponentModule,\n ErrorComponentModule\n ],\n providers: [\n OAuthSingleSignOnGuard\n ]\n})\nexport class OAuthSingleSignOnRoutingModule {\n\n public static forRouting(options: OAuthSingleSignOnOptions = {}): ModuleWithProviders<OAuthSingleSignOnRoutingModule> {\n const providers: Provider[] = [\n OAuthSingleSignOnGuard\n ];\n if (options.redirectContinueDisabled) {\n providers.push({\n provide: RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED,\n useValue: options.redirectContinueDisabled\n });\n }\n return {\n ngModule: OAuthSingleSignOnRoutingModule,\n providers\n };\n }\n\n}\n","import { Routes } from '@angular/router';\nimport { ContinueComponent } from './continue/continue.component';\nimport {\n ProfileResolve,\n ContainerComponent,\n LoadingComponent\n} from '@rxap/oauth';\nimport { OAuthSingleSignOnGuard } from './o-auth-single-sign-on.guard';\nimport { ErrorComponent } from './error/error.component';\n\nexport const RXAP_O_AUTH_SINGLE_SIGN_ON_ROUTES: Routes = [\n {\n path: '',\n component: ContainerComponent,\n children: [\n {\n path: 'continue',\n component: ContinueComponent,\n resolve: {\n profile: ProfileResolve\n }\n },\n {\n path: 'error',\n component: ErrorComponent\n },\n {\n path: '',\n canActivate: [ OAuthSingleSignOnGuard ],\n component: LoadingComponent\n },\n {\n path: '**',\n redirectTo: ''\n }\n ]\n }\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MAoBa,wBAAyB,SAAQ,YAAY;;;;;IASxD,YAEI,WAAwB,EAExB,qBAA4C,EAE5C,MAAc,EAGd,kBAAiC,IAAI,EAGrC,eAAmC,IAAI,EAGvC,SAAmC,IAAI,EAGvC,SAAmC,IAAI,EAGvC,kBAAmC,IAAI,EAGvC,cAAmC,IAAI;QAEzC,KAAK,CAAC,WAAW,EAAE,qBAAqB,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,CAAC,CAAC;QAjC1H,YAAO,GAAmB,IAAI,CAAC;QAC/B,aAAQ,GAAkB,IAAI,CAAC;KAiCrC;IAEY,0BAA0B,CACrC,KAAa,EACb,QAAgB,EAChB,QAAiB;;;;;YAEjB,MAAM,QAAQ,GAAG,MAAM,OAAM,0BAA0B,YAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;YACnF,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACxB,OAAO,QAAQ,CAAC;SACjB;KAAA;IAEM,gBAAgB;QACrB,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,gBAAgB,IAAI,CAAC,WAAW,iBAAiB,IAAI,CAAC,YAAY,cAAc,IAAI,CAAC,SAAS,YAAY,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;KACnK;IAEY,OAAO;;YAClB,IAAI,CAAC,YAAY,EAAE,CAAC;YACpB,IAAI,CAAC,WAAW,GAAQ,IAAI,CAAC;YAC7B,IAAI,CAAC,YAAY,GAAO,IAAI,CAAC;YAC7B,IAAI,CAAC,SAAS,GAAU,IAAI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AsB;wBACtB,wBAAwB;wBACxB,oBAAoB;qBACrB;oBACD,SAAS,EAAE;wBACT,sBAAsB;qBACvB;iBACF;;;MClBY,iCAAiC,GAAW;IACvD;QACE,IAAI,EAAO,EAAE;QACb,SAAS,EAAE,kBAAkB;QAC7B,QAAQ,EAAG;YACT;gBACE,IAAI,EAAO,UAAU;gBACrB,SAAS,EAAE,iBAAiB;gBAC5B,OAAO,EAAI;oBACT,OAAO,EAAE,cAAc;iBACxB;aACF;YACD;gBACE,IAAI,EAAO,OAAO;gBAClB,SAAS,EAAE,cAAc;aAC1B;YACD;gBACE,IAAI,EAAS,EAAE;gBACf,WAAW,EAAE,CAAE,sBAAsB,CAAE;gBACvC,SAAS,EAAI,gBAAgB;aAC9B;YACD;gBACE,IAAI,EAAQ,IAAI;gBAChB,UAAU,EAAE,EAAE;aACf;SACF;KACF;;;ACpCH;;;;;;"}
|
|
1
|
+
{"version":3,"file":"rxap-oauth-single-sign-on.js","sources":["../../../../libs/oauth/single-sign-on/src/lib/o-auth-single-sign-on.service.ts","../../../../libs/oauth/single-sign-on/src/lib/continue/continue.component.ts","../../../../libs/oauth/single-sign-on/src/lib/continue/continue.component.html","../../../../libs/oauth/single-sign-on/src/lib/continue/continue.component.module.ts","../../../../libs/oauth/single-sign-on/src/lib/tokens.ts","../../../../libs/oauth/single-sign-on/src/lib/o-auth-single-sign-on.guard.ts","../../../../libs/oauth/single-sign-on/src/lib/error/error.component.ts","../../../../libs/oauth/single-sign-on/src/lib/error/error.component.html","../../../../libs/oauth/single-sign-on/src/lib/error/error.component.module.ts","../../../../libs/oauth/single-sign-on/src/lib/o-auth-single-sign-on-routing.module.ts","../../../../libs/oauth/single-sign-on/src/lib/routes.ts","../../../../libs/oauth/single-sign-on/src/rxap-oauth-single-sign-on.ts"],"sourcesContent":["import {\n OAuthService,\n OAuthMethodResponse,\n OAuthMethod,\n GetOAuthProfileMethod,\n PROFILE_AUTH_ENDPOINT,\n OAUTH_AUTH_ENDPOINT,\n OAUTH_SECRET,\n OAUTH_SSO_URL,\n RXAP_O_AUTH_REDIRECT_SIGN_OUT,\n RXAP_O_AUTH_REDIRECT_URL\n} from '@rxap/oauth';\nimport {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport { Router } from '@angular/router';\n\n@Injectable()\nexport class OAuthSingleSignOnService extends OAuthService {\n\n public payload: string | null = null;\n public redirect: string | null = null;\n\n // It is required to define the constructor with the injection\n // definition. If not defined the constructor will be created by\n // typescript without an parameters, bc the payload and redirect\n // initialization is done in the constructor.\n constructor(\n @Inject(OAuthMethod)\n oAuthMethod: OAuthMethod,\n @Inject(GetOAuthProfileMethod)\n getOAuthProfileMethod: GetOAuthProfileMethod,\n @Inject(Router)\n router: Router,\n @Optional()\n @Inject(PROFILE_AUTH_ENDPOINT)\n profileEndpoint: string | null = null,\n @Optional()\n @Inject(OAUTH_AUTH_ENDPOINT)\n authEndpoint: string | null = null,\n @Optional()\n @Inject(OAUTH_SECRET)\n secret: string | null = null,\n @Optional()\n @Inject(OAUTH_SSO_URL)\n ssoUrl: string | null = null,\n @Optional()\n @Inject(RXAP_O_AUTH_REDIRECT_SIGN_OUT)\n redirectSignOut: string[] | null = null,\n @Optional()\n @Inject(RXAP_O_AUTH_REDIRECT_URL)\n redirectUrl: string | null = null\n ) {\n super(oAuthMethod, getOAuthProfileMethod, router, profileEndpoint, authEndpoint, secret, ssoUrl, redirectSignOut, redirectUrl);\n }\n\n public async signInWithEmailAndPassword(\n email: string,\n password: string,\n remember: boolean\n ): Promise<OAuthMethodResponse> {\n const response = await super.signInWithEmailAndPassword(email, password, remember);\n this.redirectToClient();\n return response;\n }\n\n public redirectToClient() {\n window.location.replace(`${this.redirect}?accessToken=${this.accessToken}&refreshToken=${this.refreshToken}&expiresIn=${this.expiresIn}&payload=${this.payload}`);\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 }\n\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n OnInit\n} from '@angular/core';\nimport {\n animate,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\nimport {\n ActivatedRoute,\n Router\n} from '@angular/router';\nimport {\n map,\n take\n} from 'rxjs/operators';\nimport { OAuthSingleSignOnService } from '../o-auth-single-sign-on.service';\nimport {\n RXAP_O_AUTH_REDIRECT_SIGN_IN,\n OAuthService\n} from '@rxap/oauth';\n\n@Component({\n selector: 'rxap-continue',\n templateUrl: './continue.component.html',\n styleUrls: [ './continue.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'rxap-continue' },\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\n // fade in when created. this could also be written as transition('void => *')\n transition(':enter', [style({ opacity: 0 }), 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})\nexport class ContinueComponent<\n Profile extends Record<string, any> = Record<string, any>\n> implements OnInit\n{\n public profile!: Promise<Profile>;\n\n constructor(\n @Inject(ActivatedRoute)\n private readonly route: ActivatedRoute,\n @Inject(Router)\n private readonly router: Router,\n @Inject(OAuthService)\n private readonly oAuthService: OAuthSingleSignOnService,\n @Inject(RXAP_O_AUTH_REDIRECT_SIGN_IN)\n private readonly redirectLogin: string[]\n ) {}\n\n public ngOnInit() {\n this.profile = this.route.data\n .pipe(\n take(1),\n map((data) => data.profile)\n )\n .toPromise();\n }\n\n signOut() {\n this.oAuthService.signOut();\n return this.router.navigate(this.redirectLogin);\n }\n\n redirect() {\n this.oAuthService.redirectToClient();\n }\n}\n","<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\"\n fxLayoutGap=\"32px\">\n\n <div class=\"header\" fxFlex=\"nogrow\" fxLayout=\"column\" fxLayoutAlign=\"center center\">\n\n <div *ngIf=\"profile | async as p\" [name]=\"p.username\" [rxapAvatarBackgroundImage]=\"p.username\"\n class=\"avatar-icon\"></div>\n\n </div>\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\">\n\n <p><span i18n>Currently Sign In as:</span> <span class=\"username\"><br>{{(profile | async)?.username}}</span></p>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"8px\">\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"redirect()\" color=\"primary\" i18n mat-raised-button>Continue</button>\n </div>\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"signOut()\" color=\"accent\" i18n mat-stroked-button>Change Account</button>\n </div>\n\n </div>\n\n </div>\n\n</div>\n","import { NgModule } from '@angular/core';\nimport { ContinueComponent } from './continue.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { CommonModule } from '@angular/common';\nimport { AvatarBackgroundImageDirectiveModule } from '@rxap/directives';\n\n\n@NgModule({\n declarations: [\n ContinueComponent\n ],\n imports: [\n FlexLayoutModule,\n MatIconModule,\n MatButtonModule,\n CommonModule,\n AvatarBackgroundImageDirectiveModule\n ],\n exports: [\n ContinueComponent\n ]\n})\nexport class ContinueComponentModule {\n}\n","import { InjectionToken } from '@angular/core';\n\nexport function DefaultRedirectContinueFactory(): string[] {\n return [ '/', 'continue' ];\n}\n\nexport const RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE = new InjectionToken('rxap/o-auth/single-sign-on/redirect-continue', {\n providedIn: 'root',\n factory: DefaultRedirectContinueFactory\n});\n\nexport const RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED = new InjectionToken('rxap/o-auth/single-sign-on/redirect-continue-disabled');\n","import {\n ActivatedRouteSnapshot,\n CanActivate,\n Router,\n UrlTree\n} from '@angular/router';\nimport {\n Inject,\n Injectable,\n Optional\n} from '@angular/core';\nimport { OAuthSingleSignOnService } from './o-auth-single-sign-on.service';\nimport {\n OAuthService,\n RXAP_O_AUTH_REDIRECT_SIGN_IN\n} from '@rxap/oauth';\nimport {\n RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE,\n RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED\n} from './tokens';\n\n@Injectable()\nexport class OAuthSingleSignOnGuard implements CanActivate {\n\n constructor(\n @Inject(OAuthService)\n private readonly authentication: OAuthSingleSignOnService,\n @Inject(Router)\n private readonly router: Router,\n @Inject(RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE)\n private readonly redirectContinue: string[],\n @Inject(RXAP_O_AUTH_REDIRECT_SIGN_IN)\n private readonly redirectLogin: string[],\n @Optional()\n @Inject(RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED)\n private readonly redirectContinueDisabled: boolean | null\n ) {\n }\n\n public async canActivate(route: ActivatedRouteSnapshot): Promise<boolean | UrlTree> {\n\n const redirect = route.queryParamMap.get('redirect');\n const secret = route.queryParamMap.get('secret');\n const payload = route.queryParamMap.get('payload');\n const action = route.queryParamMap.get('action');\n\n if (!redirect || !secret) {\n console.warn(`The query params 'redirect' or 'secret' is not defined!`);\n return this.router.createUrlTree([ 'error' ]);\n }\n\n this.authentication.redirect = atob(redirect);\n this.authentication.payload = payload;\n this.authentication.secret = secret;\n\n if (action) {\n if (action === 'signOut') {\n await this.authentication.signOut();\n return this.router.createUrlTree(this.redirectLogin);\n }\n }\n\n const isAuthenticated = await this.authentication.isAuthenticated();\n\n console.log('isAuthenticated', isAuthenticated);\n\n if (isAuthenticated) {\n if (this.redirectContinueDisabled) {\n this.authentication.redirectToClient();\n return true;\n }\n return this.router.createUrlTree(this.redirectContinue);\n }\n\n return this.router.createUrlTree(this.redirectLogin);\n }\n\n}\n","import {\n ChangeDetectionStrategy,\n Component\n} from '@angular/core';\nimport {\n animate,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\n\n@Component({\n selector: 'rxap-error',\n templateUrl: './error.component.html',\n styleUrls: [ './error.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'rxap-error' },\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\n // fade in when created. this could also be written as transition('void => *')\n transition(':enter', [ style({ opacity: 0 }), 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})\nexport class ErrorComponent {\n\n public get topLevelDomain() {\n const match = location.hostname.match(/([^.]+\\.[^.]+$)/);\n if (match) {\n return match[ 0 ];\n } else {\n return location.hostname;\n }\n }\n\n public get mainApplicationUrl() {\n return `${location.protocol}//${this.topLevelDomain}`;\n }\n\n}\n","<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\"\n fxLayoutGap=\"32px\">\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\" fxLayoutGap=\"8px\">\n\n <h2 i18n=\"@@rxap-oauth.single-sign-on.error.title\">Error</h2>\n <p i18n=\"@@rxap-oauth.single-sign-on.error.message\">Please open the main application again.</p>\n <a [href]=\"mainApplicationUrl\" color=\"primary\" mat-raised-button>\n <ng-container i18n=\"@@rxap-oauth.single-sign-on.error.action\">Navigate to main application</ng-container>\n </a>\n\n </div>\n\n </div>\n\n</div>\n","import { NgModule } from '@angular/core';\nimport { ErrorComponent } from './error.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MatButtonModule } from '@angular/material/button';\n\n\n@NgModule({\n declarations: [\n ErrorComponent\n ],\n imports: [\n FlexLayoutModule,\n MatButtonModule\n ],\n exports: [\n ErrorComponent\n ]\n})\nexport class ErrorComponentModule {}\n","import {\n NgModule,\n ModuleWithProviders,\n Provider\n} from '@angular/core';\nimport {\n ContainerComponentModule,\n LoadingComponentModule\n} from '@rxap/oauth';\nimport { ContinueComponentModule } from './continue/continue.component.module';\nimport { RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED } from './tokens';\nimport { OAuthSingleSignOnGuard } from './o-auth-single-sign-on.guard';\nimport { ErrorComponentModule } from './error/error.component.module';\n\nexport interface OAuthSingleSignOnOptions {\n redirectContinueDisabled?: boolean\n}\n\n@NgModule({\n exports: [\n ContinueComponentModule,\n LoadingComponentModule,\n ContainerComponentModule,\n ErrorComponentModule\n ],\n providers: [\n OAuthSingleSignOnGuard\n ]\n})\nexport class OAuthSingleSignOnRoutingModule {\n\n public static forRouting(options: OAuthSingleSignOnOptions = {}): ModuleWithProviders<OAuthSingleSignOnRoutingModule> {\n const providers: Provider[] = [\n OAuthSingleSignOnGuard\n ];\n if (options.redirectContinueDisabled) {\n providers.push({\n provide: RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED,\n useValue: options.redirectContinueDisabled\n });\n }\n return {\n ngModule: OAuthSingleSignOnRoutingModule,\n providers\n };\n }\n\n}\n","import { Routes } from '@angular/router';\nimport { ContinueComponent } from './continue/continue.component';\nimport {\n ProfileResolve,\n ContainerComponent,\n LoadingComponent\n} from '@rxap/oauth';\nimport { OAuthSingleSignOnGuard } from './o-auth-single-sign-on.guard';\nimport { ErrorComponent } from './error/error.component';\n\nexport const RXAP_O_AUTH_SINGLE_SIGN_ON_ROUTES: Routes = [\n {\n path: '',\n component: ContainerComponent,\n children: [\n {\n path: 'continue',\n component: ContinueComponent,\n resolve: {\n profile: ProfileResolve\n }\n },\n {\n path: 'error',\n component: ErrorComponent\n },\n {\n path: '',\n canActivate: [ OAuthSingleSignOnGuard ],\n component: LoadingComponent\n },\n {\n path: '**',\n redirectTo: ''\n }\n ]\n }\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;M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