@rxap/oauth 12.1.0 → 13.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_theming.scss +1 -1
- package/esm2020/index.mjs +17 -0
- package/esm2020/lib/container/container.component.mjs +38 -0
- package/esm2020/lib/container/container.component.module.mjs +22 -0
- package/esm2020/lib/get-o-auth-profile.method.mjs +40 -0
- package/esm2020/lib/loading/loading.component.mjs +12 -0
- package/esm2020/lib/loading/loading.component.module.mjs +26 -0
- package/esm2020/lib/o-auth-extract.guard.mjs +55 -0
- package/esm2020/lib/o-auth-redirect.guard.mjs +31 -0
- package/esm2020/lib/o-auth-routing.module.mjs +25 -0
- package/esm2020/lib/o-auth.method.mjs +111 -0
- package/esm2020/lib/o-auth.module.mjs +27 -0
- package/esm2020/lib/o-auth.service.mjs +303 -0
- package/esm2020/lib/profile.resolve.mjs +37 -0
- package/esm2020/lib/routes.mjs +26 -0
- package/esm2020/lib/sign-in-with-redirect/sign-in-with-redirect.component.mjs +47 -0
- package/esm2020/lib/sign-in-with-redirect/sign-in-with-redirect.component.module.mjs +38 -0
- package/esm2020/lib/tokens.mjs +17 -0
- package/esm2020/rxap-oauth.mjs +5 -0
- package/esm2020/single-sign-on/lib/continue/continue.component.mjs +70 -0
- package/esm2020/single-sign-on/lib/continue/continue.component.module.mjs +42 -0
- package/esm2020/single-sign-on/lib/error/error.component.mjs +44 -0
- package/esm2020/single-sign-on/lib/error/error.component.module.mjs +30 -0
- package/esm2020/single-sign-on/lib/o-auth-single-sign-on-routing.module.mjs +50 -0
- package/esm2020/single-sign-on/lib/o-auth-single-sign-on.guard.mjs +69 -0
- package/esm2020/single-sign-on/lib/o-auth-single-sign-on.service.mjs +77 -0
- package/esm2020/single-sign-on/lib/routes.mjs +33 -0
- package/esm2020/single-sign-on/lib/tokens.mjs +10 -0
- package/esm2020/single-sign-on/public_api.mjs +10 -0
- package/esm2020/single-sign-on/rxap-oauth-single-sign-on.mjs +5 -0
- package/fesm2015/rxap-oauth-single-sign-on.mjs +408 -0
- package/fesm2015/rxap-oauth-single-sign-on.mjs.map +1 -0
- package/fesm2015/{rxap-oauth.js → rxap-oauth.mjs} +137 -171
- package/fesm2015/rxap-oauth.mjs.map +1 -0
- package/fesm2020/rxap-oauth-single-sign-on.mjs +392 -0
- package/fesm2020/rxap-oauth-single-sign-on.mjs.map +1 -0
- package/fesm2020/rxap-oauth.mjs +801 -0
- package/fesm2020/rxap-oauth.mjs.map +1 -0
- package/lib/o-auth.method.d.ts +0 -2
- package/lib/o-auth.service.d.ts +2 -7
- package/package.json +43 -31
- package/single-sign-on/package.json +5 -5
- package/bundles/rxap-oauth-single-sign-on.umd.js +0 -811
- package/bundles/rxap-oauth-single-sign-on.umd.js.map +0 -1
- package/bundles/rxap-oauth.umd.js +0 -1373
- package/bundles/rxap-oauth.umd.js.map +0 -1
- package/esm2015/index.js +0 -17
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/container/container.component.js +0 -45
- package/esm2015/lib/container/container.component.js.map +0 -1
- package/esm2015/lib/container/container.component.module.js +0 -22
- package/esm2015/lib/container/container.component.module.js.map +0 -1
- package/esm2015/lib/get-o-auth-profile.method.js +0 -41
- package/esm2015/lib/get-o-auth-profile.method.js.map +0 -1
- package/esm2015/lib/loading/loading.component.js +0 -18
- package/esm2015/lib/loading/loading.component.js.map +0 -1
- package/esm2015/lib/loading/loading.component.module.js +0 -26
- package/esm2015/lib/loading/loading.component.module.js.map +0 -1
- package/esm2015/lib/o-auth-extract.guard.js +0 -55
- package/esm2015/lib/o-auth-extract.guard.js.map +0 -1
- package/esm2015/lib/o-auth-redirect.guard.js +0 -34
- package/esm2015/lib/o-auth-redirect.guard.js.map +0 -1
- package/esm2015/lib/o-auth-routing.module.js +0 -25
- package/esm2015/lib/o-auth-routing.module.js.map +0 -1
- package/esm2015/lib/o-auth.method.js +0 -120
- package/esm2015/lib/o-auth.method.js.map +0 -1
- package/esm2015/lib/o-auth.module.js +0 -28
- package/esm2015/lib/o-auth.module.js.map +0 -1
- package/esm2015/lib/o-auth.service.js +0 -336
- package/esm2015/lib/o-auth.service.js.map +0 -1
- package/esm2015/lib/profile.resolve.js +0 -40
- package/esm2015/lib/profile.resolve.js.map +0 -1
- package/esm2015/lib/routes.js +0 -26
- package/esm2015/lib/routes.js.map +0 -1
- package/esm2015/lib/sign-in-with-redirect/sign-in-with-redirect.component.js +0 -54
- package/esm2015/lib/sign-in-with-redirect/sign-in-with-redirect.component.js.map +0 -1
- package/esm2015/lib/sign-in-with-redirect/sign-in-with-redirect.component.module.js +0 -38
- package/esm2015/lib/sign-in-with-redirect/sign-in-with-redirect.component.module.js.map +0 -1
- package/esm2015/lib/tokens.js +0 -17
- package/esm2015/lib/tokens.js.map +0 -1
- package/esm2015/rxap-oauth.js +0 -5
- package/esm2015/rxap-oauth.js.map +0 -1
- package/esm2015/single-sign-on/lib/continue/continue.component.js +0 -77
- package/esm2015/single-sign-on/lib/continue/continue.component.js.map +0 -1
- package/esm2015/single-sign-on/lib/continue/continue.component.module.js +0 -42
- package/esm2015/single-sign-on/lib/continue/continue.component.module.js.map +0 -1
- package/esm2015/single-sign-on/lib/error/error.component.js +0 -51
- package/esm2015/single-sign-on/lib/error/error.component.js.map +0 -1
- package/esm2015/single-sign-on/lib/error/error.component.module.js +0 -30
- package/esm2015/single-sign-on/lib/error/error.component.module.js.map +0 -1
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on-routing.module.js +0 -50
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on-routing.module.js.map +0 -1
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on.guard.js +0 -72
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on.guard.js.map +0 -1
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on.service.js +0 -85
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on.service.js.map +0 -1
- package/esm2015/single-sign-on/lib/routes.js +0 -33
- package/esm2015/single-sign-on/lib/routes.js.map +0 -1
- package/esm2015/single-sign-on/lib/tokens.js +0 -10
- package/esm2015/single-sign-on/lib/tokens.js.map +0 -1
- package/esm2015/single-sign-on/public_api.js +0 -10
- package/esm2015/single-sign-on/public_api.js.map +0 -1
- package/esm2015/single-sign-on/rxap-oauth-single-sign-on.js +0 -5
- package/esm2015/single-sign-on/rxap-oauth-single-sign-on.js.map +0 -1
- package/fesm2015/rxap-oauth-single-sign-on.js +0 -416
- package/fesm2015/rxap-oauth-single-sign-on.js.map +0 -1
- package/fesm2015/rxap-oauth.js.map +0 -1
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Inject, Optional, Component, ChangeDetectionStrategy, NgModule, InjectionToken } from '@angular/core';
|
|
3
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
4
|
+
import * as i5 from '@angular/router';
|
|
5
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
6
|
+
import { take, map } from 'rxjs/operators';
|
|
7
|
+
import * as i1 from '@rxap/oauth';
|
|
8
|
+
import { OAuthService, OAuthMethod, GetOAuthProfileMethod, PROFILE_AUTH_ENDPOINT, OAUTH_AUTH_ENDPOINT, OAUTH_SECRET, OAUTH_SSO_URL, RXAP_O_AUTH_REDIRECT_SIGN_OUT, RXAP_O_AUTH_REDIRECT_URL, RXAP_O_AUTH_REDIRECT_SIGN_IN, LoadingComponentModule, ContainerComponentModule, ContainerComponent, ProfileResolve, LoadingComponent } from '@rxap/oauth';
|
|
9
|
+
import * as i1$1 from '@angular/material/button';
|
|
10
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
11
|
+
import * as i2 from '@angular/flex-layout/flex';
|
|
12
|
+
import * as i3 from '@angular/common';
|
|
13
|
+
import { CommonModule } from '@angular/common';
|
|
14
|
+
import * as i4 from '@rxap/directives';
|
|
15
|
+
import { AvatarBackgroundImageDirectiveModule } from '@rxap/directives';
|
|
16
|
+
import { __awaiter } from 'tslib';
|
|
17
|
+
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
18
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
19
|
+
|
|
20
|
+
class OAuthSingleSignOnService extends OAuthService {
|
|
21
|
+
// It is required to define the constructor with the injection
|
|
22
|
+
// definition. If not defined the constructor will be created by
|
|
23
|
+
// typescript without an parameters, bc the payload and redirect
|
|
24
|
+
// initialization is done in the constructor.
|
|
25
|
+
constructor(oAuthMethod, getOAuthProfileMethod, router, profileEndpoint = null, authEndpoint = null, secret = null, ssoUrl = null, redirectSignOut = null, redirectUrl = null) {
|
|
26
|
+
super(oAuthMethod, getOAuthProfileMethod, router, profileEndpoint, authEndpoint, secret, ssoUrl, redirectSignOut, redirectUrl);
|
|
27
|
+
this.payload = null;
|
|
28
|
+
this.redirect = null;
|
|
29
|
+
}
|
|
30
|
+
signInWithEmailAndPassword(email, password, remember) {
|
|
31
|
+
const _super = Object.create(null, {
|
|
32
|
+
signInWithEmailAndPassword: { get: () => super.signInWithEmailAndPassword }
|
|
33
|
+
});
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
const response = yield _super.signInWithEmailAndPassword.call(this, email, password, remember);
|
|
36
|
+
this.redirectToClient();
|
|
37
|
+
return response;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
redirectToClient() {
|
|
41
|
+
window.location.replace(`${this.redirect}?accessToken=${this.accessToken}&refreshToken=${this.refreshToken}&expiresIn=${this.expiresIn}&payload=${this.payload}`);
|
|
42
|
+
}
|
|
43
|
+
signOut() {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
this.clearStorage();
|
|
46
|
+
this.accessToken = null;
|
|
47
|
+
this.refreshToken = null;
|
|
48
|
+
this.expiresAt = null;
|
|
49
|
+
this._isAuthenticated = false;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
OAuthSingleSignOnService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", 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: "13.2.3", ngImport: i0, type: OAuthSingleSignOnService });
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OAuthSingleSignOnService, decorators: [{
|
|
56
|
+
type: Injectable
|
|
57
|
+
}], ctorParameters: function () {
|
|
58
|
+
return [{ type: i1.OAuthMethod, decorators: [{
|
|
59
|
+
type: Inject,
|
|
60
|
+
args: [OAuthMethod]
|
|
61
|
+
}] }, { type: i1.GetOAuthProfileMethod, decorators: [{
|
|
62
|
+
type: Inject,
|
|
63
|
+
args: [GetOAuthProfileMethod]
|
|
64
|
+
}] }, { type: i5.Router, decorators: [{
|
|
65
|
+
type: Inject,
|
|
66
|
+
args: [Router]
|
|
67
|
+
}] }, { type: undefined, decorators: [{
|
|
68
|
+
type: Optional
|
|
69
|
+
}, {
|
|
70
|
+
type: Inject,
|
|
71
|
+
args: [PROFILE_AUTH_ENDPOINT]
|
|
72
|
+
}] }, { type: undefined, decorators: [{
|
|
73
|
+
type: Optional
|
|
74
|
+
}, {
|
|
75
|
+
type: Inject,
|
|
76
|
+
args: [OAUTH_AUTH_ENDPOINT]
|
|
77
|
+
}] }, { type: undefined, decorators: [{
|
|
78
|
+
type: Optional
|
|
79
|
+
}, {
|
|
80
|
+
type: Inject,
|
|
81
|
+
args: [OAUTH_SECRET]
|
|
82
|
+
}] }, { type: undefined, decorators: [{
|
|
83
|
+
type: Optional
|
|
84
|
+
}, {
|
|
85
|
+
type: Inject,
|
|
86
|
+
args: [OAUTH_SSO_URL]
|
|
87
|
+
}] }, { type: undefined, decorators: [{
|
|
88
|
+
type: Optional
|
|
89
|
+
}, {
|
|
90
|
+
type: Inject,
|
|
91
|
+
args: [RXAP_O_AUTH_REDIRECT_SIGN_OUT]
|
|
92
|
+
}] }, { type: undefined, decorators: [{
|
|
93
|
+
type: Optional
|
|
94
|
+
}, {
|
|
95
|
+
type: Inject,
|
|
96
|
+
args: [RXAP_O_AUTH_REDIRECT_URL]
|
|
97
|
+
}] }];
|
|
98
|
+
} });
|
|
99
|
+
|
|
100
|
+
class ContinueComponent {
|
|
101
|
+
constructor(route, router, oAuthService, redirectLogin) {
|
|
102
|
+
this.route = route;
|
|
103
|
+
this.router = router;
|
|
104
|
+
this.oAuthService = oAuthService;
|
|
105
|
+
this.redirectLogin = redirectLogin;
|
|
106
|
+
}
|
|
107
|
+
ngOnInit() {
|
|
108
|
+
this.profile = this.route.data
|
|
109
|
+
.pipe(take(1), map((data) => data.profile))
|
|
110
|
+
.toPromise();
|
|
111
|
+
}
|
|
112
|
+
signOut() {
|
|
113
|
+
this.oAuthService.signOut();
|
|
114
|
+
return this.router.navigate(this.redirectLogin);
|
|
115
|
+
}
|
|
116
|
+
redirect() {
|
|
117
|
+
this.oAuthService.redirectToClient();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
ContinueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContinueComponent, deps: [{ token: ActivatedRoute }, { token: Router }, { token: OAuthService }, { token: RXAP_O_AUTH_REDIRECT_SIGN_IN }], target: i0.ɵɵFactoryTarget.Component });
|
|
121
|
+
ContinueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", 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}\n"], 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: [
|
|
122
|
+
trigger('fadeAnimation', [
|
|
123
|
+
// the "in" style determines the "resting" state of the element when it is visible.
|
|
124
|
+
state('in', style({ opacity: 1 })),
|
|
125
|
+
// fade in when created. this could also be written as transition('void => *')
|
|
126
|
+
transition(':enter', [style({ opacity: 0 }), animate(300)]),
|
|
127
|
+
// fade out when destroyed. this could also be written as transition('void => *')
|
|
128
|
+
transition(':leave', animate(300, style({ opacity: 0 }))),
|
|
129
|
+
]),
|
|
130
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContinueComponent, decorators: [{
|
|
132
|
+
type: Component,
|
|
133
|
+
args: [{ selector: 'rxap-continue', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-continue' }, animations: [
|
|
134
|
+
trigger('fadeAnimation', [
|
|
135
|
+
// the "in" style determines the "resting" state of the element when it is visible.
|
|
136
|
+
state('in', style({ opacity: 1 })),
|
|
137
|
+
// fade in when created. this could also be written as transition('void => *')
|
|
138
|
+
transition(':enter', [style({ opacity: 0 }), animate(300)]),
|
|
139
|
+
// fade out when destroyed. this could also be written as transition('void => *')
|
|
140
|
+
transition(':leave', animate(300, style({ opacity: 0 }))),
|
|
141
|
+
]),
|
|
142
|
+
], 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}\n"] }]
|
|
143
|
+
}], ctorParameters: function () {
|
|
144
|
+
return [{ type: i5.ActivatedRoute, decorators: [{
|
|
145
|
+
type: Inject,
|
|
146
|
+
args: [ActivatedRoute]
|
|
147
|
+
}] }, { type: i5.Router, decorators: [{
|
|
148
|
+
type: Inject,
|
|
149
|
+
args: [Router]
|
|
150
|
+
}] }, { type: OAuthSingleSignOnService, decorators: [{
|
|
151
|
+
type: Inject,
|
|
152
|
+
args: [OAuthService]
|
|
153
|
+
}] }, { type: undefined, decorators: [{
|
|
154
|
+
type: Inject,
|
|
155
|
+
args: [RXAP_O_AUTH_REDIRECT_SIGN_IN]
|
|
156
|
+
}] }];
|
|
157
|
+
} });
|
|
158
|
+
|
|
159
|
+
class ContinueComponentModule {
|
|
160
|
+
}
|
|
161
|
+
ContinueComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContinueComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
162
|
+
ContinueComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContinueComponentModule, declarations: [ContinueComponent], imports: [FlexLayoutModule,
|
|
163
|
+
MatIconModule,
|
|
164
|
+
MatButtonModule,
|
|
165
|
+
CommonModule,
|
|
166
|
+
AvatarBackgroundImageDirectiveModule], exports: [ContinueComponent] });
|
|
167
|
+
ContinueComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContinueComponentModule, imports: [[
|
|
168
|
+
FlexLayoutModule,
|
|
169
|
+
MatIconModule,
|
|
170
|
+
MatButtonModule,
|
|
171
|
+
CommonModule,
|
|
172
|
+
AvatarBackgroundImageDirectiveModule
|
|
173
|
+
]] });
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContinueComponentModule, decorators: [{
|
|
175
|
+
type: NgModule,
|
|
176
|
+
args: [{
|
|
177
|
+
declarations: [
|
|
178
|
+
ContinueComponent
|
|
179
|
+
],
|
|
180
|
+
imports: [
|
|
181
|
+
FlexLayoutModule,
|
|
182
|
+
MatIconModule,
|
|
183
|
+
MatButtonModule,
|
|
184
|
+
CommonModule,
|
|
185
|
+
AvatarBackgroundImageDirectiveModule
|
|
186
|
+
],
|
|
187
|
+
exports: [
|
|
188
|
+
ContinueComponent
|
|
189
|
+
]
|
|
190
|
+
}]
|
|
191
|
+
}] });
|
|
192
|
+
|
|
193
|
+
function DefaultRedirectContinueFactory() {
|
|
194
|
+
return ['/', 'continue'];
|
|
195
|
+
}
|
|
196
|
+
const RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE = new InjectionToken('rxap/o-auth/single-sign-on/redirect-continue', {
|
|
197
|
+
providedIn: 'root',
|
|
198
|
+
factory: DefaultRedirectContinueFactory
|
|
199
|
+
});
|
|
200
|
+
const RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED = new InjectionToken('rxap/o-auth/single-sign-on/redirect-continue-disabled');
|
|
201
|
+
|
|
202
|
+
class OAuthSingleSignOnGuard {
|
|
203
|
+
constructor(authentication, router, redirectContinue, redirectLogin, redirectContinueDisabled) {
|
|
204
|
+
this.authentication = authentication;
|
|
205
|
+
this.router = router;
|
|
206
|
+
this.redirectContinue = redirectContinue;
|
|
207
|
+
this.redirectLogin = redirectLogin;
|
|
208
|
+
this.redirectContinueDisabled = redirectContinueDisabled;
|
|
209
|
+
}
|
|
210
|
+
canActivate(route) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
+
const redirect = route.queryParamMap.get('redirect');
|
|
213
|
+
const secret = route.queryParamMap.get('secret');
|
|
214
|
+
const payload = route.queryParamMap.get('payload');
|
|
215
|
+
const action = route.queryParamMap.get('action');
|
|
216
|
+
if (!redirect || !secret) {
|
|
217
|
+
console.warn(`The query params 'redirect' or 'secret' is not defined!`);
|
|
218
|
+
return this.router.createUrlTree(['error']);
|
|
219
|
+
}
|
|
220
|
+
this.authentication.redirect = atob(redirect);
|
|
221
|
+
this.authentication.payload = payload;
|
|
222
|
+
this.authentication.secret = secret;
|
|
223
|
+
if (action) {
|
|
224
|
+
if (action === 'signOut') {
|
|
225
|
+
yield this.authentication.signOut();
|
|
226
|
+
return this.router.createUrlTree(this.redirectLogin);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
const isAuthenticated = yield this.authentication.isAuthenticated();
|
|
230
|
+
console.log('isAuthenticated', isAuthenticated);
|
|
231
|
+
if (isAuthenticated) {
|
|
232
|
+
if (this.redirectContinueDisabled) {
|
|
233
|
+
this.authentication.redirectToClient();
|
|
234
|
+
return true;
|
|
235
|
+
}
|
|
236
|
+
return this.router.createUrlTree(this.redirectContinue);
|
|
237
|
+
}
|
|
238
|
+
return this.router.createUrlTree(this.redirectLogin);
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
OAuthSingleSignOnGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", 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 });
|
|
243
|
+
OAuthSingleSignOnGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OAuthSingleSignOnGuard });
|
|
244
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OAuthSingleSignOnGuard, decorators: [{
|
|
245
|
+
type: Injectable
|
|
246
|
+
}], ctorParameters: function () {
|
|
247
|
+
return [{ type: OAuthSingleSignOnService, decorators: [{
|
|
248
|
+
type: Inject,
|
|
249
|
+
args: [OAuthService]
|
|
250
|
+
}] }, { type: i5.Router, decorators: [{
|
|
251
|
+
type: Inject,
|
|
252
|
+
args: [Router]
|
|
253
|
+
}] }, { type: undefined, decorators: [{
|
|
254
|
+
type: Inject,
|
|
255
|
+
args: [RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE]
|
|
256
|
+
}] }, { type: undefined, decorators: [{
|
|
257
|
+
type: Inject,
|
|
258
|
+
args: [RXAP_O_AUTH_REDIRECT_SIGN_IN]
|
|
259
|
+
}] }, { type: undefined, decorators: [{
|
|
260
|
+
type: Optional
|
|
261
|
+
}, {
|
|
262
|
+
type: Inject,
|
|
263
|
+
args: [RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED]
|
|
264
|
+
}] }];
|
|
265
|
+
} });
|
|
266
|
+
|
|
267
|
+
class ErrorComponent {
|
|
268
|
+
get topLevelDomain() {
|
|
269
|
+
const match = location.hostname.match(/([^.]+\.[^.]+$)/);
|
|
270
|
+
if (match) {
|
|
271
|
+
return match[0];
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
return location.hostname;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
get mainApplicationUrl() {
|
|
278
|
+
return `${location.protocol}//${this.topLevelDomain}`;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
282
|
+
ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", 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}\n"], 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: [
|
|
283
|
+
trigger('fadeAnimation', [
|
|
284
|
+
// the "in" style determines the "resting" state of the element when it is visible.
|
|
285
|
+
state('in', style({ opacity: 1 })),
|
|
286
|
+
// fade in when created. this could also be written as transition('void => *')
|
|
287
|
+
transition(':enter', [style({ opacity: 0 }), animate(300)]),
|
|
288
|
+
// fade out when destroyed. this could also be written as transition('void => *')
|
|
289
|
+
transition(':leave', animate(300, style({ opacity: 0 })))
|
|
290
|
+
])
|
|
291
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ErrorComponent, decorators: [{
|
|
293
|
+
type: Component,
|
|
294
|
+
args: [{ selector: 'rxap-error', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-error' }, animations: [
|
|
295
|
+
trigger('fadeAnimation', [
|
|
296
|
+
// the "in" style determines the "resting" state of the element when it is visible.
|
|
297
|
+
state('in', style({ opacity: 1 })),
|
|
298
|
+
// fade in when created. this could also be written as transition('void => *')
|
|
299
|
+
transition(':enter', [style({ opacity: 0 }), animate(300)]),
|
|
300
|
+
// fade out when destroyed. this could also be written as transition('void => *')
|
|
301
|
+
transition(':leave', animate(300, style({ opacity: 0 })))
|
|
302
|
+
])
|
|
303
|
+
], 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}\n"] }]
|
|
304
|
+
}] });
|
|
305
|
+
|
|
306
|
+
class ErrorComponentModule {
|
|
307
|
+
}
|
|
308
|
+
ErrorComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ErrorComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
309
|
+
ErrorComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ErrorComponentModule, declarations: [ErrorComponent], imports: [FlexLayoutModule,
|
|
310
|
+
MatButtonModule], exports: [ErrorComponent] });
|
|
311
|
+
ErrorComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ErrorComponentModule, imports: [[
|
|
312
|
+
FlexLayoutModule,
|
|
313
|
+
MatButtonModule
|
|
314
|
+
]] });
|
|
315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ErrorComponentModule, decorators: [{
|
|
316
|
+
type: NgModule,
|
|
317
|
+
args: [{
|
|
318
|
+
declarations: [
|
|
319
|
+
ErrorComponent
|
|
320
|
+
],
|
|
321
|
+
imports: [
|
|
322
|
+
FlexLayoutModule,
|
|
323
|
+
MatButtonModule
|
|
324
|
+
],
|
|
325
|
+
exports: [
|
|
326
|
+
ErrorComponent
|
|
327
|
+
]
|
|
328
|
+
}]
|
|
329
|
+
}] });
|
|
330
|
+
|
|
331
|
+
class OAuthSingleSignOnRoutingModule {
|
|
332
|
+
static forRouting(options = {}) {
|
|
333
|
+
const providers = [
|
|
334
|
+
OAuthSingleSignOnGuard
|
|
335
|
+
];
|
|
336
|
+
if (options.redirectContinueDisabled) {
|
|
337
|
+
providers.push({
|
|
338
|
+
provide: RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED,
|
|
339
|
+
useValue: options.redirectContinueDisabled
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
return {
|
|
343
|
+
ngModule: OAuthSingleSignOnRoutingModule,
|
|
344
|
+
providers
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
OAuthSingleSignOnRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OAuthSingleSignOnRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
349
|
+
OAuthSingleSignOnRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OAuthSingleSignOnRoutingModule, exports: [ContinueComponentModule,
|
|
350
|
+
LoadingComponentModule,
|
|
351
|
+
ContainerComponentModule,
|
|
352
|
+
ErrorComponentModule] });
|
|
353
|
+
OAuthSingleSignOnRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OAuthSingleSignOnRoutingModule, providers: [
|
|
354
|
+
OAuthSingleSignOnGuard
|
|
355
|
+
], imports: [ContinueComponentModule,
|
|
356
|
+
LoadingComponentModule,
|
|
357
|
+
ContainerComponentModule,
|
|
358
|
+
ErrorComponentModule] });
|
|
359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OAuthSingleSignOnRoutingModule, decorators: [{
|
|
360
|
+
type: NgModule,
|
|
361
|
+
args: [{
|
|
362
|
+
exports: [
|
|
363
|
+
ContinueComponentModule,
|
|
364
|
+
LoadingComponentModule,
|
|
365
|
+
ContainerComponentModule,
|
|
366
|
+
ErrorComponentModule
|
|
367
|
+
],
|
|
368
|
+
providers: [
|
|
369
|
+
OAuthSingleSignOnGuard
|
|
370
|
+
]
|
|
371
|
+
}]
|
|
372
|
+
}] });
|
|
373
|
+
|
|
374
|
+
const RXAP_O_AUTH_SINGLE_SIGN_ON_ROUTES = [
|
|
375
|
+
{
|
|
376
|
+
path: '',
|
|
377
|
+
component: ContainerComponent,
|
|
378
|
+
children: [
|
|
379
|
+
{
|
|
380
|
+
path: 'continue',
|
|
381
|
+
component: ContinueComponent,
|
|
382
|
+
resolve: {
|
|
383
|
+
profile: ProfileResolve
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
path: 'error',
|
|
388
|
+
component: ErrorComponent
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
path: '',
|
|
392
|
+
canActivate: [OAuthSingleSignOnGuard],
|
|
393
|
+
component: LoadingComponent
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
path: '**',
|
|
397
|
+
redirectTo: ''
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
}
|
|
401
|
+
];
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Generated bundle index. Do not edit.
|
|
405
|
+
*/
|
|
406
|
+
|
|
407
|
+
export { ContinueComponent, ContinueComponentModule, DefaultRedirectContinueFactory, ErrorComponent, ErrorComponentModule, OAuthSingleSignOnGuard, OAuthSingleSignOnRoutingModule, OAuthSingleSignOnService, RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE, RXAP_O_AUTH_SINGLE_SIGN_ON_ROUTES, RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED };
|
|
408
|
+
//# sourceMappingURL=rxap-oauth-single-sign-on.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rxap-oauth-single-sign-on.mjs","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 }\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